System Design – Distributed Systems
This module teaches both the building blocks of systems that scale — scalability, reliability, availability, load balancing, caching, CDNs, CAP, message queues, indexes, cluster scheduling — and the repeatable method for putting them together in an interview or a design review.
The method is the transferable skill: requirements → estimation → API → data model → core problem → scale. The concept lessons give you the parts; the five case studies march that method end to end — a URL shortener, a paste store, a photo feed, feed ranking, and a real-time messenger — each reusing the parts you already built.
Prerequisites
- You’ve built and shipped software — HTTP, databases, and client/server flow are familiar
- Comfort with rough back-of-envelope estimation (QPS, bytes, latency)
- No distributed-systems background assumed — every concept is built from the ground up
How to read this module
Work the concept lessons in order first — each one is a part the case studies reuse. Then the case studies assemble those parts, and each names what breaks and how to fix it. By Messenger you’ll have designed the whole stack from load balancer to object store to real-time delivery.
Prerequisites
A working engineer’s fluency
You’ve built and shipped software — HTTP, databases, and basic client/server flow are familiar
Comfort with rough estimation
Back-of-envelope math (QPS, bytes, latency) — no distributed-systems background assumed
Lessons
Scalability
Handle more load — vertical vs horizontal, replication vs sharding
Reliability
Keep working despite failure — redundancy, MTBF/MTTR, RPO/RTO
Availability
The nines — dependency chains, failover, graceful degradation
Efficiency & Throughput
Latency vs throughput, Little’s Law, utilization and bottlenecks
Manageability
Operate it — observability, golden signals, deploy safety, incidents
Load Balancer
Spread load — L4 vs L7, algorithms, health checks, HA pairs
Caching
Serve from memory — patterns, eviction, TTLs, stampedes
CDNs
Push content to the edge — push vs pull, immutable content
Proxies
Forward vs reverse proxy — and what each one buys you
CAP Theorem
Under partition, choose consistency or availability — CP vs AP
Message Queues
Decouple with async — delivery guarantees, pub/sub, backpressure
Database Indexes
B+-trees, leftmost-prefix, covering and composite indexes
Case I · TinyURL
A URL shortener — the six-step method and base62 key generation
Case II · Pastebin
Store the content — split metadata from the blob, front it with a CDN
Case III · Instagram
The news feed — fan-out on write vs read vs hybrid for celebrities
Case IV · Feed Ranking
Rank the feed — signals, scoring, candidate generation, latency budget
Case V · Messenger
Real-time chat — WebSockets, connection gateways, presence, delivery
Unlocks
AI-Powered Software Development
Where the latency-budget and failure-mode reasoning gets applied to AI systems