System Design Deep Dive
Build the mental toolkit for designing large systems: fundamentals, building blocks, data storage and reliability patterns. Then apply it to ten classic case studies and timed mock interviews.
What you will be able to do
- Run a system design interview from requirements and estimates to trade-offs
- Choose load balancers, caches, queues and CDNs and justify each one
- Pick storage, replication and partitioning strategies for a workload
- Design for failure with redundancy, idempotency and observability
- Present ten classic designs clearly in 45 minutes
Roadmap
Bar length shows each module's share of study time.
- 112h5 topics
Fundamentals
The vocabulary and method behind every design.
Show topicsNot startedStructure any design question into clear phases with time boxes.
- Clarify functional and non-functional requirements
- Define the API
- Draw the high-level design
- Deep dive into bottlenecks and time-box each phase
Estimate QPS, storage and bandwidth from user numbers in under five minutes.
- Memorise powers of two and latency numbers
- Estimate QPS from daily users
- Estimate storage and bandwidth
- Practise five quick estimates
Translate 'four nines' into allowed downtime and reason about latency percentiles.
- Convert nines into allowed downtime
- Explain p50, p95 and p99 latency
- Distinguish SLAs, SLOs and SLIs
Choose an API style and protocol for a given client and traffic pattern.
- Compare REST, gRPC and GraphQL
- Know when to use WebSockets or SSE
- Design a REST API with pagination
- Choose a protocol for a scenario
Make a service horizontally scalable by moving state out of it.
- Compare vertical and horizontal scaling
- Move session state out of servers
- Design a stateless service tier
- 212h5 topics
Building blocks
The components almost every design is assembled from.
Show topicsNot startedChoose L4 vs L7 load balancing and an algorithm for a workload.
- Compare L4 and L7 load balancing
- Choose round robin, least connections or hashing
- Explain health checks and reverse proxies
Pick cache-aside, write-through or write-back and handle invalidation and stampedes.
- Compare cache-aside, write-through and write-back
- Choose TTLs and invalidation
- Prevent cache stampedes
- Use a CDN for static content
Decide between a queue and a log like Kafka and explain delivery guarantees.
- Compare queues and pub/sub
- Explain Kafka partitions and consumer groups
- Explain at-least-once and exactly-once delivery
- Choose a queue or log for a scenario
Explain token bucket and sliding window limits and where to enforce them.
- Explain token bucket and sliding window
- Decide where to enforce limits
- List API gateway responsibilities
Know when to put data in blob storage or a search engine instead of a database.
- Store large blobs in object storage
- Use an inverted index for search
- Keep a search index in sync with the database
- 314h5 topics
Data storage at scale
Where most of the hard trade-offs live.
Show topicsNot startedChoose a data model and database family for an access pattern.
- Compare relational and key-value stores
- Compare document and wide-column stores
- Know when a graph database fits
- Match a database to an access pattern
Explain replication lag and choose a replication model.
- Explain leader-follower replication
- Explain replication lag effects
- Compare multi-leader and leaderless models
- Choose a replication model
Pick a shard key, avoid hot spots and rebalance with consistent hashing.
- Compare range and hash partitioning
- Pick a good shard key
- Avoid hot spots
- Rebalance with consistent hashing
Explain strong vs eventual consistency and quorum reads and writes.
- Explain CAP and PACELC
- Compare strong and eventual consistency
- Calculate quorum reads and writes
Explain why some databases favour writes and others favour reads.
- Explain how B-trees store data
- Explain LSM trees and compaction
- Compare read and write amplification
Module resources:Designing Data-Intensive Applications ↗ - 414h6 topics
Reliability & distributed systems
Systems that keep working when things fail.
Show topicsNot startedEliminate single points of failure and design active-passive or active-active setups.
- Find single points of failure
- Design active-passive failover
- Design active-active multi-region
Make operations safe to retry and avoid retry storms.
- Set sensible timeouts
- Retry with exponential backoff and jitter
- Make APIs idempotent with keys
- Avoid retry storms
Contain failures so one slow dependency doesn't take down the system.
- Explain the circuit breaker pattern
- Isolate resources with bulkheads
- Apply backpressure and load shedding
Keep data consistent across services without two-phase commit everywhere.
- Explain why 2PC is costly
- Design a saga with compensations
- Use the transactional outbox pattern
- Handle duplicate events idempotently
Explain what Raft solves and when you need a coordinator like etcd or ZooKeeper.
- Explain what consensus solves
- Walk through Raft leader election
- Know when to use etcd or ZooKeeper
- Use distributed locks with fencing tokens
Define SLIs and SLOs and design metrics, logs and traces for a system.
- Define SLIs and SLOs
- Use error budgets for release decisions
- Design metrics, logs and traces
- 516h5 topics
Case studies I: classic services
The questions interviewers ask most often.
Show topicsNot startedDesign ID generation, redirects, caching and analytics for billions of links.
- Clarify requirements and estimate scale
- Design the API
- Generate short IDs without collisions
- Design storage, redirects and caching
- Add click analytics and discuss trade-offs
Design a rate limiter shared across many API servers with low latency.
- Gather requirements and limit rules
- Choose a limiting algorithm
- Store counters in a shared Redis
- Handle race conditions and failures
- Discuss latency and accuracy trade-offs
Design partitioning, replication, quorums and failure handling for a KV store.
- Define requirements and API
- Partition with consistent hashing
- Replicate with tunable quorums
- Handle failures with hinted handoff
- Resolve conflicts and discuss trade-offs
Design fan-out to push, email and SMS with retries, preferences and deduplication.
- Clarify channels and requirements
- Estimate notification volume
- Design the API and data model
- Fan out through queues to providers
- Add retries, preferences and deduplication
Design a low-latency typeahead with tries, ranking and periodic rebuilds.
- Define requirements and latency goals
- Estimate query volume
- Design a trie with top-k suggestions
- Rank by popularity
- Rebuild and cache the index periodically
- 619h5 topics
Case studies II: large-scale products
Products with hard scale, real-time or media constraints.
Show topicsNot startedChoose between fan-out on write and read and handle celebrity accounts.
- Clarify requirements and estimate scale
- Design the post and feed APIs
- Model posts, follows and feeds
- Compare fan-out on write and read
- Handle celebrity accounts with a hybrid
- Cache and rank the feed
Design real-time delivery, presence, ordering and message storage.
- Clarify one-to-one and group requirements
- Estimate message volume
- Design WebSocket connection handling
- Model and store messages
- Track presence and message ordering
- Discuss delivery guarantees and trade-offs
Design upload, transcoding, CDN delivery and adaptive bitrate streaming.
- Clarify upload and playback requirements
- Estimate storage and bandwidth
- Design the upload and transcoding pipeline
- Deliver through a CDN
- Explain adaptive bitrate streaming
- Discuss cost trade-offs
Design location tracking, geospatial matching and trip state.
- Clarify rider and driver requirements
- Estimate location update volume
- Design the API and trip data model
- Index locations with geohash or quadtree
- Match riders to drivers
- Model trip state transitions
Design a polite, distributed crawler with deduplication and a URL frontier.
- Clarify scope and politeness rules
- Estimate pages and bandwidth
- Design the URL frontier
- Respect robots.txt and rate limits
- Deduplicate URLs and content
- 712h2 topics
Mock interviews
Practise out loud until the structure is automatic.
Show topicsNot startedComplete four 45-minute designs alone and write up the trade-offs you chose.
- Pick four design prompts
- Time-box each design to 45 minutes
- Cover requirements, API and data model
- Write up the trade-offs you chose
- Compare against reference solutions
Do at least three mocks with feedback and fix the gaps they expose.
- Find peers or a mock platform
- Do three mock interviews
- Collect structured feedback
- Fix the gaps exposed
- Retry a failed prompt