SYSTEM DESIGN · TRACK 3
Building Blocks
The components you draw on the whiteboard, one at a time: what each solves, how it works inside, how it fails, how it scales, and how to defend it in an interview.
All 14 are live. Each one is an animated walkthrough you can step through, written notes, and the interview questions with answers.
- 1 Load balancerThe load balancer as you would draw and defend it in a design interview: what happens to one request inside an L7 proxy, L4 versus L7, the balancing algorithms and when each wins, health checks and connection draining, how the balancer itself stays up, two-tier and global load balancing, and how to size the tier.
- 2 API gatewayWhat an API gateway does that a load balancer does not: the filter chain every request passes through, authentication at the edge, quotas, aggregation and backends-for-frontends, canary routing, how it differs from a reverse proxy and a service mesh, the failure modes that turn it into a bottleneck, and how to scale and size it.
- 3 CacheThe cache tier as a component you can defend in an interview: what is inside one cache node (hash table, LRU list, expiry), how keys are spread across a cluster, safe invalidation, the four classic failures (stampede, hot key, penetration, avalanche) and their fixes, what happens when a node dies, and how to size memory and hit rate.
- 4 CDNThe CDN as a component you draw and defend: how a user is routed to a nearby edge, what happens inside a point of presence, cache keys and hit ratio, tiered caching with an origin shield, push versus pull, purging and versioned URLs, dynamic acceleration and edge compute, signed URLs, what fails and how, and how to size bandwidth and origin load.
- 5 Relational database at scaleThe order of moves that takes a relational database from one server to a fleet: scale up and tune, pool connections, add read replicas and handle lag, partition big tables, split by feature, then shard with a routing layer. Plus failover without split brain, backups and point-in-time recovery, online schema changes, and how to size it.
- 6 Key-value storeHow a distributed key-value store works end to end, the way an interviewer expects you to design it: the API, an LSM storage engine on each node, consistent hashing with virtual nodes, replication and tunable quorums, conflict handling with versions, gossip failure detection, hinted handoff and Merkle-tree repair, the leader-per-range alternative, and sizing.
- 7 Object storageObject storage as a building block: the bucket-key-object model, the split between a metadata service and data nodes, how a PUT is chunked and protected with replication or erasure coding, presigned and multipart uploads straight from clients, durability arithmetic, disk and zone failures, storage tiers, serving through a CDN, and sizing.
- 8 Message queueThe message queue as a component you can defend: what a broker stores and how, queue versus log designs, partitions and consumer groups, acknowledgements and visibility timeouts, delivery guarantees and idempotent consumers, retries with backoff and dead-letter queues, ordering, replication for durability, consumer lag and backpressure, and sizing partitions and consumers.
- 9 Pub-sub and fan-outHow one event reaches many receivers: topics and subscriptions, why each subscriber needs its own durable queue or offset, push versus pull delivery, filtering, the SNS-to-SQS and consumer-group fan-out patterns, real-time fan-out to millions of connected devices, fan-out on write versus read and the celebrity problem, failure isolation, and sizing the amplification.
- 10 Search indexThe search index as a component: why database LIKE queries fail, how an inverted index and text analysis work, how a query is matched and ranked with BM25, immutable segments and near-real-time refresh, sharding with scatter-gather, replicas, feeding the index from the database through a change stream, zero-downtime reindexing, autocomplete, failure modes and sizing.
- 11 Rate limiterThe rate limiter as a production component rather than an algorithm: where it runs, how rules are modelled and pushed, an atomic token bucket in Redis, the latency budget, sharding counters and hot keys, local-plus-global hybrids, fail-open versus fail-closed, limits across regions, concurrency limits and load shedding, client headers, and sizing memory and operations.
- 12 Unique ID generatorHow to hand out unique IDs across many machines with no per-ID coordination: requirements, database sequences and their limits, UUIDv4 versus time-ordered UUIDv7, range allocation from a ticket table, the Snowflake bit layout and its arithmetic, assigning worker ids safely, clocks that jump backwards, sequence exhaustion, what IDs leak, and sizing.
- 13 Job scheduler and workersHow to run background work reliably at scale: why cron on one box fails, the jobs table, how a scheduler finds due jobs and why only one should act on each, claiming work with leases and SKIP LOCKED, heartbeats and reclaiming jobs from dead workers, retries and dead letters, recurring schedules and missed runs, priorities and fairness, scaling the scheduler, metrics, and sizing.
- 14 Monitoring, logging and alertingThe telemetry pipeline as a building block: collecting metrics, logs and traces, pull versus push, a buffer between producers and storage, how a time-series database stores and compresses samples, label cardinality, cheap log storage, trace sampling, alert evaluation with SLO burn rates, routing and deduplication, monitoring the monitor, and sizing ingestion and storage.
Next: Patterns
The 7 situations that repeat across problems, and the standard moves.