System Design Notes

Learning systems
by building them.

A working study log for Staff-level system design. Each entry documents the full design process — requirements through deep dives — with diagrams, tradeoffs, and honest reasoning throughout.

Foundation

The 6-Step Design Framework

The structured approach behind every design on this site. Requirements, estimation, interface, data model, high-level design, and deep dives — with timing guidance and key signals for each step.

Worked Examples
01
URL Shortener · Read-Heavy · Caching · Streaming · Lambda Architecture

Design TinyURL

100M DAU, 1K writes/sec, 10K reads/sec. Full session — requirements through data model. Two-level caching, Kafka analytics pipeline, pre-generated code pool, duplicate URL logic, and reclamation service.

Complete
02
Social Feed · Fan-Out · Social Graph · Feed Ranking · OLTP vs OLAP

Design a News Feed

300M DAU, 58 writes/sec, 5,800 reads/sec. Hybrid fan-out (push under 1M followers, pull for celebrities), engagement-based ranking, two-phase read path, and five-database data model justified by access pattern.

Complete
03
Infrastructure · API Gateway · Redis · Sliding Window · Token Bucket

Design a Rate Limiter

10M DAU, 1M requests/sec at API gateway. All five algorithms compared — token bucket, leaking bucket, fixed window, sliding window log, sliding window counter (chosen). Config-driven rules engine with polling worker, Redis failure edge case handled.

Complete
04

Design a Chat System — coming soon

05

Design YouTube — coming soon

Concepts
C1
Uniqueness · Distributed Coordination · Hot Path Design

Short Code Generator

How to generate millions of unique short identifiers without hot-path coordination. Covers hash-based, region prefix, pre-generated pool, and token service approaches. Referenced from TinyURL and any system needing unique IDs at scale.

Ongoing
C2
Write Amplification · Social Systems · Message Queues

Fan-Out Pattern

One event that must reach many recipients. Push vs pull vs hybrid — tradeoffs, the celebrity threshold decision, inactive follower filtering, and when eventual consistency unlocks the entire async architecture. Referenced from News Feed.

Complete
C3
Database Selection · Storage Patterns · Columnar vs Row

OLTP vs OLAP

Two types of read workloads with opposite performance characteristics. Row-oriented vs columnar storage internals, when each applies, and the feed table mistake that comes up in every News Feed session. Referenced from News Feed and TinyURL.

Complete
C4

Sharding — coming soon

📐

How these notes are structured

Every design follows the 6-step framework. Each page starts simple — a base case that works — then adds complexity in layers. Diagrams are always inline. Tradeoffs are named explicitly, not buried. The goal is a page you can study from, not just skim.