A Senior Engineer’s Guide to the System Design Interview (Part 2)#
The interviewer is asking themselves: “Could this person get an MVP off the ground?”.
It’s more important to cover everything than to explain small thing in detail. “I’m going to skip going into details for now, but if we want, we can come back to it later.”
Good design is less important than being able to talk about the trade-offs.
Check in at major milestones, but not at every single decision. Milestones:
Finished high-level design.
Ball-park computations are helpful, but wasting time if they are not used later.
API: REST, RPC, GraphQL.
Databases: SQL, NoSQL.
Consistency vs. Availability (CAP theorem with P chosen by default).
Scaling: Vertical, horizontal.
Load balancers: Round-robin, least connections.
Caching: Write-through, write-behind, invalidation.
Queues: at least once, at most once, ordering guarantees.
Indexing: B-tree, hash.
Failovers: Lost updates, leader failure detection, split-brain.
Replication: sync, async.
Consistent hashing: faster node number changes, log(nodes) lookups.
Don’t go down a rabbit hole, get high-level design first.
High-level design is usually a diagram that includes subsystems and their interactions.
A walkthrough for important end-to-end scenarios.