Capstone: putting distributed architecture together
A repeatable method for hard design problems, and a checklist that ties every lesson in this course together.
25 min readA method for hard problems
Large problems feel open-ended until you impose an order. Work through it in the same sequence every time, and spend most of your time on the steps where the problem is unusual rather than redrawing load balancers.
- Requirements and numbers: users, peak requests per second, read/write ratio, data size growth, latency targets, regions
- Core entities and access patterns, ranked by rate
- API and service boundaries around data ownership
- Data placement: storage engine, partition key, replication and consistency per dataset
- Coordination: what needs consensus, transactions or sagas, and what can be eventually consistent
- Failure and scale: region loss, hot keys, retries, capacity headroom
Spend consistency carefully
Most hard problems hide one or two invariants that must never break: a driver is assigned to one trip, an object is never lost, a document converges for every editor, a profile is never silently overwritten. Find them first and protect them with the strongest tool that fits: a conditional write on a single leader, a consensus store, a CRDT, or erasure coding across failure domains. Then let everything else be fast and eventually consistent, with session guarantees where users would notice.
Do the arithmetic out loud
Every decision should carry a number. 250 000 location updates per second means in-memory state, not a relational table. 70 ms between regions means a synchronous cross-region write doubles checkout latency. RS(10, 4) at 1.4x overhead on 20 PB saves 32 PB of raw disk compared with triple replication. Numbers turn opinions into designs a reviewer can check, and they are what the SystCode Feedback panel computes as you build. Round aggressively: an answer within a factor of two is enough to choose an architecture.
Common failure modes to check before you finish
Review your diagram against the failures this course covered: a partition that becomes hot; a cache that serves stale data into a decision; retries without idempotency keys; events published outside the transaction; a single coordinator or leader with no failover; cross-region calls on the hot path; surviving regions without headroom; replicas in one failure domain. Each of the four major challenges in this course exercises several of these at once, so treat the Feedback panel's warnings as a review from a senior colleague and iterate.
Key takeaways
- Use the same sequence every time: numbers, access patterns, boundaries, data placement, coordination, failure
- Identify the invariants first and protect only those with strong coordination
- Attach a number to every decision so it can be checked
- Review the finished design against a checklist of distributed failure modes
Sign in to track lessons and earn badges.