CAP theorem
~11 minTwo data centres hold the same data. The link between them breaks. Each must now answer from its own copy, or refuse. CAP is the proof that there is no third way.
Reason through system design interviews — sketching an architecture, scaling it, and defending your trade-offs. Covers distributed theory, consistency, resilience patterns and service boundaries.
849 of 849 questions in your plan: 0 known, 0 in progress, 0 due, 0 skipped, 849 new. 0 cut, outside your plan.
Two data centres hold the same data. The link between them breaks. Each must now answer from its own copy, or refuse. CAP is the proof that there is no third way.
A design round opens on one sentence, such as design a URL shortener, a chat service or a ride-matching backend, and leaves the rest to you. It appears in most backend, full-stack, platform and SRE loops from middle level up, usually as one conversation of forty-five minutes to an hour, and from senior level it often outweighs the coding rounds. The first minutes are yours to spend: which requirements matter, what load to plan for, which operations must stay fast.
Then the interviewer presses on one part of the sketch until it bends. How do two nodes hand out short codes without ever issuing the same one? What happens to the write path when an account with millions of followers posts? A client retried a payment after a timeout: was the card charged twice, and what in the design prevents it?
The diagram looks much the same at every level. The grade comes from what you say about it unprompted: the guarantee each component gives, the failure that breaks it, and what a stronger guarantee would cost. Staff and principal candidates are also expected to argue against their own design: the queue that was not needed, the second service that should have stayed inside the first.
Building Blocks comes first because it is the round itself. Estimating capacity opens most designs, since request rates and storage growth decide whether one database is enough before any box is drawn. The rest of the scalability module gives each common component its job and works through the problems interviewers keep returning to: a feed that must choose between fan-out on write and on read, nearby search, a scheduler for delayed jobs. ML system design sits among them as the version of the round a model team gives.
Theory & Guarantees follows, and it is what lets those answers survive a follow-up. Every box in the first module makes a quiet promise: how stale a cached read may be, how far a follower may trail its leader, whether a redelivered message is processed twice. Core distributed theory gives those promises names and limits, from replication and consensus to delivery semantics, where the retried payment gets its answer. Consistency models then take one thread to depth, down to CRDTs for replicas that accept writes independently and must still converge.
With the guarantees named, the plan turns from components to their failures. The pattern catalog reads as a set of responses to specific breakages: timeouts, retries and circuit breakers for a dependency that stalls, the saga for a business transaction too wide for one lock. Service boundaries close the plan because they are the decision the earlier modules price: whether to split a system at all can only be argued once you know what a network hop, a separately owned database and a saga each cost.
Facing a first design round, stay longest in Building Blocks, because many rounds are lost on structure rather than knowledge: boxes drawn before the numbers, numbers guessed before the requirements. Drill its questions, then rehearse one classic problem aloud per sitting against a clock; a design you have only read about comes apart at the first follow-up. Senior and staff candidates usually know the components already. Their gap is the exact name for what each one guarantees, so their hours belong in the theory and pattern modules. Quorums show why level matters on this page: at the junior end they are a definition, at the principal end a failure scenario with a lagging replica in it. Narrowing level to the posting's band serves the version your round will use; with only days left, cut importance down to must know too, so the remaining hours go to what every round leans on. With months, a by topics study order puts replication before consensus and the patterns before the boundaries, the sequence this plan argues in; pair it with one written design a week. The plan reasons about components by what they guarantee, not by product: it has no module on a particular database, broker or cache. When a follow-up moves from "put a queue here" to partitions, consumer groups and offset commits, the [Apache Kafka roadmap](/roadmaps/kafka) answers at that depth, and the [Redis roadmap](/roadmaps/redis) does the same for the cache and a rate limiter's counters.
Facing a first design round, stay longest in Building Blocks, because many rounds are lost on structure rather than knowledge: boxes drawn before the numbers, numbers guessed before the requirements. Drill its questions, then rehearse one classic problem aloud per sitting against a clock; a design you have only read about comes apart at the first follow-up. Senior and staff candidates usually know the components already. Their gap is the exact name for what each one guarantees, so their hours belong in the theory and pattern modules.
Quorums show why level matters on this page: at the junior end they are a definition, at the principal end a failure scenario with a lagging replica in it. Narrowing level to the posting's band serves the version your round will use; with only days left, cut importance down to must know too, so the remaining hours go to what every round leans on. With months, a by topics study order puts replication before consensus and the patterns before the boundaries, the sequence this plan argues in; pair it with one written design a week.
The plan reasons about components by what they guarantee, not by product: it has no module on a particular database, broker or cache. When a follow-up moves from "put a queue here" to partitions, consumer groups and offset commits, the Apache Kafka roadmap answers at that depth, and the Redis roadmap does the same for the cache and a rate limiter's counters.