Architecture Challenges
Whiteboard architecture problems train the same muscles as Orders RFCs: requirements, estimates, components, and trade-offs.
Introduction
Whiteboard architecture problems train the same muscles as Orders RFCs: requirements, estimates, components, and trade-offs. These challenges stretch messaging, geo, feeds, ledgers, and multi-region active-active — then ask you to map lessons back to a Spring Boot 3 / Java 21 service mesh.
There is no single correct diagram. There is a well-justified one with failure modes.
Practise out loud; timebox; write decisions down.
Purpose of this lesson
Complete five architecture whiteboard challenges with estimates, diagrams, and explicit trade-offs tied to Boot 3 realities.
Understanding the topic
Five classic prompts — deliver artifacts, not vibes.
- WhatsApp @ 1B users — messaging, presence, delivery receipts.
- Uber matching — riders, drivers, geo-indexing.
- Instagram feed — fan-out vs fan-in trade-offs.
- Bank ledger — strong consistency, audit, idempotent transfers.
- Multi-region active-active — Spring Boot Orders across regions.
Step-by-step explanation
- Clarify FR/NFR and write three scale assumptions.
- Draw high-level boxes; mark sync vs async edges.
- Deep-dive the hardest component (storage or consistency).
- List three failures and mitigations; map what would be Boot 3 services vs managed cloud.
Informative example
Ledger challenge — decision card.
Prompt: Design a bank ledger for TechLearningPRO wallet transfersConstraints: exactly-once money movement under client retries; audit foreverDecisions:- Postgres as source of truth; UNIQUE(transfer_id)- Double-entry rows in ledger_lines inside one @Transactional boundary- Outbox → Kafka for notifications (not for money truth)- Idempotent API: POST /transfers with Idempotency-Key- No multi-region active-active for balances (choose primary region + async read replicas)Trade-off: simpler consistency vs higher cross-region write latencyBoot 3 note: keep money in domain service; no javax.*; Java 21 virtual threads for notification fan-out only
Real-world use
TechLearningPRO evaluated active-active Orders across two regions and rejected it for checkout writes after estimating conflict rates on inventory reservations. They chose primary-region writes + read replicas — the same trade-off a strong ledger whiteboard answer surfaces.
Security implications
Architecture choices change blast radius.
- Cross-region replication of PII needs encryption and residency review.
- Admin planes stay in one tightly controlled network.
- Secrets per region — never a single shared long-lived credential in diagrams.
Best practices
- Narrate alternatives you rejected.
- Separate control plane from data plane.
- Always end with observability and rollback.
Common mistakes
- Drawing twenty boxes before stating RPS assumptions.
- Choosing multi-region active-active without conflict resolution.
- Putting money truth in Kafka instead of the database transaction.
Advanced interview questions
Interview Prep
Practice concise answers, then expand each card for the explanation.
1AdvancedQuestionFan-out on write vs fan-in on read for feeds?+
Answer
2IntermediateQuestionWhy keep money truth in the DB transaction?+
Answer
3IntermediateQuestionWhat breaks in naive active-active inventory?+
Answer
Hands-on exercise
Whiteboard pack (45 min each). 1) WhatsApp-scale messaging — include ack/receipt flow. 2) Uber matching — geo index choice + hotspot handling. 3) Instagram feed — fan-out on write vs read; when to hybrid. 4) Bank ledger — idempotent transfer sequence diagram. 5) Active-active Orders — pick a conflict strategy or justify single-primary writes. Deliverable per prompt: 1 page assumptions, 1 diagram, 5 trade-off bullets, 3 failure modes.
Summary
Architecture challenges build senior judgment. Next: quiz yourself across the whole Boot course.