Systems
How large systems are built and hold together — the high-level end of the spectrum.
Sub-topics
- Messaging — Handing off work between services without losing it: queues, logs, and delivery guarantees.
- Storage — Keeping bytes safe and findable at scale: durability engines, erasure coding, replication, and the metadata that locates every object.
- Streaming — Computing over unbounded data as it arrives: stateful operators, event time and late data, consistent snapshots, and exactly-once through crashes.
- Caching — Serving reads in under a millisecond and shielding the database from the load: sharding, eviction, hot keys, and stampede protection.
- Observability — Seeing inside a running system: metrics and time-series storage, range queries and downsampling, alerting, and the cardinality that decides whether it all fits in memory.
Explainers
- Design a Stream Processor with Exactly-Once — From a single consumer with a dictionary to a dataflow of operators that survives a crash without double-counting: checkpoint barriers, watermarks for late data, a keyed state backend, and a two-phase-commit sink — drawn, computed, and animated.
- Design a Distributed Cache — Start with one box in front of the database; end with a sharded, replicated cache that survives a celebrity key pulling 300k requests a second. Consistent hashing, cache-aside, eviction, and the hot-key problem — detection, absorption, and stampede protection — drawn and computed.
- Design a Durable Key-Value Store — Start with a hash map behind a socket; end with a crash-survivable storage engine. The write-ahead log — append before apply, fsync, and replay-on-recovery — is the whole story, drawn and computed.
- Design a Metrics & Monitoring System — From a metrics table in Postgres to a purpose-built time-series database — the append-only TSDB, delta-of-delta plus XOR compression, the cardinality bomb that decides whether it fits in RAM, downsampling, and an alerting pipeline that watches itself.
- Design S3-Like Object Storage — From one server writing files on disk to an exabyte store that survives an entire data-centre dying — the metadata/data split, erasure coding, placement across failure domains, and repair as the real durability lever.
- Design a Distributed Message Queue — From one producer and one consumer to partitions, replication, and back-pressure — the high-level end of the spectrum, drawn and animated.