System design, one concept at a time
The opening of every lesson is free to read, and the first chapters in full. Pro unlocks the rest. Open any lesson in the app to play its animation, solve its code challenge and take the quiz.
Part 1 · Foundations
The vocabulary and the way of thinking. Start here.
1. Scale From Zero to Millions of Users
- Single server setup
- Separate the database (and pick SQL or NoSQL)
- Vertical vs horizontal scaling
- Load balancer
- Database replication
- Cache
- Content delivery network (CDN)
- Stateless web tier
- Multiple data centers
- Message queue
- Logging, metrics and automation
- Database scaling and sharding
- Millions of users and beyond
Part 2 · Core concepts
Networking, databases, caching, reliability, distributed services, observability and security: the toolbox every design draws on.
Part 3 · Building blocks
Reusable pieces that appear inside almost every big system.
4. Design a Rate Limiter
- What a rate limiter does, and why
- Where to put the rate limiter
- Algorithm 1: Token bucket
- Algorithm 2: Leaking bucket
- Algorithm 3: Fixed window counter
- Algorithm 4: Sliding window log
- Algorithm 5: Sliding window counter
- High-level architecture and detailed design
- Rate limiting in a distributed environment
- Performance, monitoring and wrap up
6. Design a Key-Value Store
- Scope, and a single-server key-value store
- The CAP theorem
- Data partition and replication
- Consistency: quorum consensus (N, W, R)
- Inconsistency resolution: versioning and vector clocks
- Failure detection: the gossip protocol
- Handling failures: sloppy quorum, hinted handoff, data center outages
- Anti-entropy with Merkle trees
- System architecture: the write path and the read path
Part 4 · Design real systems
Put everything together to design products you use every day.
Part 5 · Keep going
Where to go after Volume 1.
Part 6 · Volume 2
New: the first chapters that follow System Design Interview, Volume 2. More are on the way.