Skip to content

System Design — learning path ​

Method first, then the building blocks (networking, protocols, traffic, scale, consistency, resilience, distributed primitives, security, observability), then whole systems (payments, search, ML, feeds) and ten case studies worked end to end.

Legend ​

BadgeMeaning
Must-knowasked in almost every interview; you meet it at work constantly
Importantfrequent; expected at senior level
Good to knowextra depth that sets you apart
WIP / Todoshown next to a chapter only while it is still being written

How to read this page. Groups are in reading order and each one builds on the previous; short on time, take the Must-know chapters of every group first. The last column says in one line what the chapter gives you. Every chapter ends with a Self-check: questions & answers block (open/close all, filter by level); all questions are collected in the Interview Q&A hub.

Chapters ​

79 chapters · 75 complete · 4 not written yet

Method ​

ChapterLevelWhat you learn
What System Design Is and How It EvolvedImportantSystem design is the work of turning requirements into a structure of components, data flows and trade-offs that keeps working when load grows and parts fail.
The 4-Step ApproachMust-knowEvery system design, in an interview or at work, goes through the same four steps: agree what you are building (scope), turn it into numbers (estimate), draw the smallest design that fits the numbers…
Latency Budgets, Geography & Tail Latency (p99)Must-knowLatency is a budget the user gives you once; distance, handshakes, queues and every hop spend it, and at scale the slowest 1% of calls (the tail) decides how fast the whole system feels.

Networking & Protocols ​

ChapterLevelWhat you learn
The Client-Server ModelImportantAlmost every system on the internet is a client asking and a server answering, and almost every scaling, caching and reliability problem is a question about one of the five things that sit between the two…
IP, DNS, GeoDNS, TTL & DNS as a Routing WeaponMust-knowYour authoritative DNS is the first load balancer every user meets: before a single packet reaches your edge, a name server you control has already decided which address…
Forward vs Reverse ProxiesMust-knowA proxy is a program that sits in the middle of a connection and speaks for someone.
TCP & UDPMust-knowTCP gives you a reliable, ordered byte stream and charges you a handshake, per-connection state, congestion control and head-of-line blocking; UDP gives you single datagrams with almost nothing added…
HTTP/1.1, HTTP/2, HTTP/3, Keep-Alive & HTTPSMust-knowHTTP has one set of semantics (methods, status codes, headers, caching) and three wire versions.
Real-Time CommunicationMust-knowHTTP was built for "ask, then get an answer".
REST API DesignMust-knowREST is a set of constraints, not a URL style; an HTTP API earns its benefits (caches, safe retries, generic tooling, independent evolution) only when it uses resources, methods…
GraphQLImportantGraphQL is an API style in which the server publishes a typed schema and the client sends a query that names exactly the fields it wants…
gRPC & Protocol Buffers; REST vs GraphQL vs gRPCImportantProtocol Buffers is a schema plus a compact binary encoding in which every field is identified by a number, and gRPC is an RPC protocol that carries those messages over HTTP/2 with deadlines, metadata…
API Versioning & EvolutionImportantAn API is a promise that other people's running code depends on.
Web Sessions, Cookies, Serialization & CORSMust-knowHTTP forgets every request the moment it is answered, so a "logged-in user" is an illusion built from one cookie that the browser attaches to every request.

Traffic & Scale ​

ChapterLevelWhat you learn
Scaling StrategiesMust-knowYou scale a system in three ways: you make one machine bigger (vertical scaling), you add machines (horizontal scaling), or you do both in a planned order (diagonal scaling).
Load BalancingMust-knowA load balancer decides, for every new connection or request, which of several equivalent servers should handle it, and keeps sick or departing servers out of that decision.
Rate LimitingMust-knowA rate limiter answers one question per request, "may this caller do this now?", by remembering a small amount of state per key (a token count…
CDNsMust-knowA content delivery network (CDN) is a fleet of shared HTTP caches and proxies placed close to users (edge PoPs), arranged in tiers in front of your origin.
CachingMust-knowA cache keeps a copy of an answer closer to the person asking so that the expensive path (a database query, a remote call, a render) runs less often.
Object Storage, Distributed File Systems, Pre…ImportantData you cannot keep in a database row comes in three storage models.
Write Buffering, Batching, Coalescing, Sharde…Good to knowA database that is asked to do one small durable write per event spends its time on round trips, commits and row locks instead of on data; the fix is to take writes off the hot path (buffer)…

Consistency & Distributed Data ​

ChapterLevelWhat you learn
CAP Under a Real Partition, CP vs AP, PACELC…Must-knowWhen the network between replicas fails, every operation that needs both sides must either wait or answer without the other side; CAP names that choice, PACELC adds the price of consistency on a normal day…
Consistency ModelsMust-knowA consistency model is the contract between a replicated system and its clients: which results a read is allowed to return, given everything that was written and when.
ACID vs BASEImportantACID is a contract a database gives you inside one transaction: all-or-nothing writes, invariants that hold, no interference between concurrent work, and durable results.
Replication TopologiesMust-knowReplication keeps copies of the same data on several machines; the topology decides which copies may accept writes (one leader, several leaders, or any replica)…
Sharding at System LevelMust-knowSharding splits one dataset over many databases so that writes, storage and maintenance scale with the number of machines; the price is that every query, transaction, index…
Choosing a DatabaseMust-knowChoosing a database is a decision about queries, not about brands.

Resilience ​

ChapterLevelWhat you learn
Cascading FailuresMust-knowA cascade starts small (a spike, a lost zone, a bad deploy, a cold cache), and the system's own reactions (retries, health-check kills, failover, autoscaling…
Timeouts, Retries & JitterMust-knowA timeout decides how long you are willing to wait, a retry decides whether to ask again, backoff decides how long to pause first…
Circuit BreakerMust-knowA circuit breaker watches the outcomes of calls to one dependency and, when too many fail or crawl, stops making the call for a while: it fails fast, answers from a fallback…
Bulkheads & Graceful DegradationImportantA bulkhead gives each dependency, tenant or priority class its own fixed slice of a shared resource, so one slow or abusive neighbour can only drown its own compartment…
Load SheddingImportantEvery server has a capacity; offered load above it does not make the server "a little slower", it makes it useless, because queued requests are answered after the client has stopped waiting.
API IdempotencyMust-knowA network call can fail after the work was done, so the client cannot tell "it did not happen" from "it happened and I did not hear back".
Distributed LockingImportantA distributed lock is a promise made by a separate service that only one process may do some work right now.
Leader ElectionImportantLeader election picks one node out of many to do a job that must not be done twice at the same time (schedule, compact, own a partition, accept writes)…
Performance Antipatterns TodoImportantto be written.

Distributed Systems Primitives ​

ChapterLevelWhat you learn
Gossip Protocols, Convergence & Failure Detec…Good to knowGossip (epidemic) protocols spread information by having every node talk to a few random peers each round; an update reaches N nodes in O(log N) rounds with constant work per node, and the same trick…
Vector Clocks, Lamport Clocks & Distributed C…Good to knowMachines do not share a clock, so "which write came first?" has no answer from timestamps alone.
Merkle Trees, Read Repair, Anti-Entropy & Tom…Good to knowReplicas that accept writes independently drift apart; a store converges them on three paths: hints on the write path, read repair on the read path, and Merkle-tree anti-entropy repair in the background…
CRDTsGood to knowA CRDT (conflict-free replicated data type) is a data type whose replicas accept writes with no coordination at all, exchange states or operations in any order, and still end up identical…
Geospatial IndexingImportant"Who is within 2 km of me?" and "which 10 drivers are nearest?" cannot be answered by a normal B-tree on latitude and longitude…
Top-K & Heavy HittersGood to knowThe most frequent items of a stream (trending hashtags, best-selling products, hot cache keys, the IP addresses behind a DDoS) can be counted exactly with a hash map and a heap while the number of distinct…
Strangler FigImportantA strangler fig migration replaces a running system one slice at a time: a facade in front of it routes each request to the legacy system or the new one, the new side grows while traffic and data move over…
Cloud Design Patterns I TodoImportantto be written.
Cloud Design Patterns II TodoImportantto be written.

Security ​

ChapterLevelWhat you learn
Security FoundationsMust-knowSecurity in system design is the discipline of deciding, before the code exists, what must stay secret, correct and available, who might try to break that, where they can reach in…
AuthenticationMust-knowAuthentication is the system that turns "someone typed an email" into "this request belongs to account 42, proven with these factors, at this time".
JWT Deep DiveMust-knowA JWT is a small JSON document of claims ("this is user 42, for the orders API, until 12:10") that is signed (JWS) or encrypted…
OAuth 2.0, OpenID Connect & Single Sign-OnMust-knowOAuth 2.0 is a way to hand an application a limited, revocable key to an API without handing it your password.
Authorization ModelsImportantAuthorization answers "may this authenticated subject do this action on this resource right now?".
Cryptography in PracticeImportantCryptography in a real system is a set of decisions, not a set of algorithms: which primitive for which job, who holds which key, where plaintext exists, how keys and certificates rotate without an outage…
OWASP Top 10Must-knowAlmost every breach of a web application is one of a dozen mechanisms: the server trusts an identifier it should check (access control), lets data become code (injection, XSS)…
DDoS Protection, Firewalls, VPCs & Network Se…ImportantNetwork security is two jobs: keep the bad traffic from using up your capacity (DDoS defence: absorb it far away from your servers, drop it cheaply, make every request that reaches your code cost little)…
Mutual TLS & Securing Service-to-Service TrafficImportantInside a system, "it came from our network" is not proof of anything.
Secure SDLC, DevSecOps, Logging, Incident Res…Good to knowSecurity is not a gate at the end of the project.
OWASP API Security Top 10 (2023)Must-knowAn API hands its client a map of every object and function it has: /orders/{id}, /admin/users, PATCH /me, POST /checkout.
API Security Hardening ChecklistMust-knowA hardened API is boring at the edges: it accepts only the methods, media types, sizes and shapes it was designed for, answers everything else with the correct status code in one error format…
API Keys, Request Signing & Webhook Security TodoImportantto be written.

Observability & Operations ​

ChapterLevelWhat you learn
ObservabilityMust-knowObservability is the property that lets you answer a new question about a running system from the telemetry it already emits: metrics tell you something is wrong and how much…
Alerting That Actually WorksImportantAn alert is a request to interrupt a human, so it must be rare, urgent, actionable and about something users feel; everything else belongs on a dashboard, in a ticket or in a log.
Chaos Engineering & Game DaysGood to knowChaos engineering is controlled experimentation: you state what "healthy" looks like in numbers, inject one realistic failure into a small part of the system, and check whether the numbers stay healthy…
Containers & KubernetesMust-knowA container is an ordinary Linux process that the kernel isolates with namespaces and limits with cgroups, started from an image (a stack of read-only layers described by the OCI image spec).
Service Mesh & the Sidecar PatternImportantA sidecar is a helper process that runs next to your application in the same pod; a service mesh puts a proxy sidecar (or a per-node proxy) next to every workload and a control plane above them…
Serverless & Event-Driven ComputeImportantServerless means you hand the servers, the scaling and the idle capacity to a provider and pay per request and per millisecond; the price is a hard execution model: short, stateless, at-least-once, limited…
Capacity Planning, Failure Scenarios & Disast…ImportantCapacity planning decides how much you must own before demand arrives; failure scenarios list what can take it away; disaster recovery (DR) decides how much data you may lose…

Domain Systems ​

ChapterLevelWhat you learn
Payment Processing ArchitectureImportantA payment system moves money it cannot take back by retrying, across a network that loses answers, through a PSP (Stripe, Adyen) that tells you the truth later by webhook…
Search SystemsImportantA search system turns text into an inverted index, turns a query into the same terms, retrieves candidates in milliseconds and ranks them in stages (BM25, business signals, vectors, a learned model)…
ML SystemsGood to knowA production ML system is mostly not the model.
FeedsMust-knowA feed is a read-mostly merge of many people's writes.

Case Studies ​

ChapterLevelWhat you learn
Case StudyImportantUber is a real-time two-sided marketplace: millions of phones report where they are, a matcher pairs riders with drivers within seconds, prices move per neighbourhood…
Case StudyImportantNetflix splits itself in two: a control plane that runs in AWS (sign-in, browsing, recommendations, playback decisions, steering, encoding, data) and a data plane called Open Connect…
Case StudyImportantAmazon's retail site is a service-oriented system of hundreds of small, team-owned services.
Case StudyMust-knowWhatsApp is the reference case for "a very small team serving a very large number of always-connected phones": an Erlang/OTP server on FreeBSD that held 2 million TCP connections per box in 2012…
Case StudyMust-knowTwitter is the classic read-heavy social feed: hundreds of millions of tweets a day, each read many times by followers.
Case StudyImportantYouTube is a write-once, read-billions video system.
Case StudyGood to knowOpenAI publishes unusually concrete engineering detail about three layers: the Kubernetes clusters that train models (2,500 nodes in 2018, 7,500 in 2021), the product data tier behind ChatGPT…
Case StudyGood to knowLinkedIn is an unusually well-documented system: its own engineering blog and a 2011 paper describe how one commit log (Kafka) became the spine that connects an online database (Espresso), change capture…
Case StudyGood to knowDiscord is a chat, voice and community product whose backend, as its own engineers describe it, is a pub/sub fan-out engine (Elixir on the BEAM) in front of a Python API, Rust data services, ScyllaDB…
Case StudyMust-knowA ticketing system sells a fixed, numbered inventory to a crowd that arrives all at once; this chapter designs one from a blank page with the four-step method: scope, estimate, high-level design…

Built by Morteza Negahi