SYSTEM DESIGN · TRACK 4

Patterns

Seven situations repeat across almost every design question. Learn to spot the signal in the question and the standard moves, simplest first.

All 7 are live. Each one is an animated walkthrough you can step through, written notes, and the interview questions with answers.

  1. 1 Real-time updatesHow to get a change from your servers onto a user screen within a second: the signals that call for push, why polling breaks, long polling vs SSE vs WebSockets, a separate connection tier, routing events with pub-sub or a connection registry, fan-out to huge audiences, catching up after a reconnect, and how to explain it all in an interview.17 steps · 8 interview Q&As
  2. 2 Scaling readsWhat to do when reads outnumber writes a hundred to one: spotting a read-heavy question, why a single database tops out, then the standard moves in order (fix the query, add read replicas, cache-aside, a CDN, precomputed views), plus replication lag, cache invalidation, hot keys and stampedes, and how to present the read path in an interview.15 steps · 7 interview Q&As
  3. 3 Scaling writesWhat to do when a system must absorb a flood of writes: the signals of a write-heavy question, why one primary database tops out, and the standard moves (cheaper writes, sharding by a good key, a queue to absorb bursts, batching and pre-aggregation, sharded counters for hot keys, write-optimised stores), with the trade-offs and how to say it in an interview.15 steps · 7 interview Q&As
  4. 4 Dealing with contentionWhat to do when many requests race for the same thing: the last seat, the last item in stock, a wallet balance. Why read-check-write oversells, then the standard moves: atomic conditional updates, pessimistic locks, optimistic versioning, holds with expiry, distributed locks with fencing, and single-writer queues for flash sales, with the trade-offs and interview phrasing.15 steps · 7 interview Q&As
  5. 5 Multi-step processesHow to run a business process that spans several services and can fail halfway, like reserve stock, charge the card, ship and notify. Why one synchronous chain leaves money and stock in limbo, why two-phase commit rarely fits, and the standard moves: a persisted state machine, idempotent retried steps, sagas with compensations, the outbox, and durable workflow engines.15 steps · 7 interview Q&As
  6. 6 Large blobsHow to handle photos, videos, documents and backups without choking your servers: split metadata from bytes, upload straight to object storage with presigned URLs, chunk and resume big uploads, confirm completion with storage events, serve through a CDN, process asynchronously, deduplicate by content hash, and control cost with storage tiers.15 steps · 7 interview Q&As
  7. 7 Long-running tasksWhat to do when work takes seconds to hours, like transcoding a video, generating a report or judging code. Why doing it inside the request fails, then the standard moves: an async job API that returns a job ID, a queue and worker pool, leases and heartbeats, retries with a dead-letter queue, status updates, autoscaling on queue depth, fairness, and cancellation.16 steps · 7 interview Q&As

Next: How to answer

The LADDER method: six steps for any design question in 45 minutes.

How to answer →