$ cd ~/learn/system-design
System Design
Scaling, load balancing, caching, databases at scale, queues, CAP and real-world designs.
CS Fundamentals/8 Lessons
Lesson 01 · 5 min read
System Design Fundamentals
How to approach a design interview, functional vs non-functional requirements, scalability, availability and the nines, latency numbers, and back-of-the-envelope estimation.
Lesson 02 · 5 min read
Load Balancing and Proxies
Load balancers, L4 vs L7, balancing algorithms, health checks, sticky sessions, reverse proxies, API gateways, CDNs and DNS-based global load balancing.
Lesson 03 · 5 min read
Caching
Where to cache, cache-aside, read-through, write-through, write-behind and write-around strategies, eviction policies, TTLs, invalidation, cache stampede and hot keys.
Lesson 04 · 6 min read
Databases at Scale
SQL vs NoSQL choice, replication (leader-follower, multi-leader, leaderless), replication lag, sharding strategies, consistent hashing, hotspots, federation and object storage.
Lesson 05 · 6 min read
Message Queues and Async Processing
Why async, message queues vs pub/sub vs logs, Kafka partitions and consumer groups, delivery guarantees, idempotency, dead-letter queues, backpressure and the outbox pattern.
Lesson 06 · 7 min read
Distributed Systems
Fallacies of distributed computing, CAP and PACELC, consistency models, consensus with Raft, leader election, clocks and ordering, two-phase commit, and failure handling patterns.
Lesson 07 · 6 min read
API Design and Microservices
REST, GraphQL and gRPC, API design rules, pagination and versioning, rate limiting algorithms, monoliths vs microservices, service discovery, and observability.
Lesson 08 · 6 min read
Design Case Studies
Worked designs for a URL shortener, a rate limiter, a chat system, a news feed, and a notification service, with estimates, data models and the key trade-offs.