System Design Notes for Interviews, With Animations
System design notes for interviews: load balancing, caching, sharding, CAP theorem, consistent hashing, message queues and rate limiting, each shown animated.
- Notes: 22
- Reading time: about 3 hours
- Cost: Free, no sign-in needed
Scaling, load balancing, caching, CDNs, replication and sharding, CAP, consistent hashing, queues, rate limiting and microservices — as animations.
Read in this order
- Introduction to System Design — System design basics for interviews: a request's life, HLD vs LLD, functional vs non-functional requirements, back-of-the-envelope estimates and latency.
- Scalability — Scalability for system design interviews: vertical vs horizontal scaling, stateless servers, latency vs throughput and moving bottlenecks, each animated.
- Load Balancing — Load balancing for system design interviews: round robin, least connections, IP hash and health checks, each shown as a looping animation with key points.
- Caching — Caching for system design interviews: cache-aside, LRU eviction, write-through vs write-back vs write-around, TTL and hit ratio, each shown as an animation.
- Content Delivery Networks (CDN) — How a CDN works for system design interviews: edge servers, origin pull, TTL and revalidation, push vs pull and cache keys, with looping animations.
- Database Replication — Database replication for system design interviews: leader-follower, synchronous vs asynchronous, replication lag, read-your-writes and failover, animated.
- Database Sharding — Database sharding for system design interviews: range vs hash sharding, choosing a shard key, hot shards, resharding and scatter-gather queries, animated.
- CAP Theorem — The CAP theorem for system design interviews: CP vs AP during a network partition, eventual consistency, quorums (R + W > N) and PACELC, shown as animations.
- Consistent Hashing — Consistent hashing for system design interviews: the hash ring, adding and removing servers, keys moved versus mod N, and virtual nodes, shown as animations.
- Message Queues — Message queues for system design interviews: buffering bursts, competing consumers vs pub/sub, acks, redelivery, idempotency and dead-letter queues, animated.
- Rate Limiting — Rate limiting for system design interviews: token bucket, leaky bucket, fixed and sliding windows, Redis counters and 429, shown as looping animations.
- Microservices and API Gateway — Microservices vs monolith, the API gateway, service discovery and circuit breakers for system design interviews, each shown as a looping animation.
- Design a URL Shortener — Design a URL shortener like TinyURL, step by step: requirements, capacity estimate, base62 IDs, the write and read paths, caching and 301 vs 302 redirects.
- Back-of-the-Envelope Estimation — Estimate QPS, peak load, storage and bandwidth in a system design interview: powers of two, latency numbers and a worked example, animated step by step.
- How to Answer a System Design Interview — A time-boxed framework for system design interviews: requirements, estimates, API, data model, high-level design, deep dives and wrap-up, animated.
- Design a Chat App (WhatsApp) — Design a chat app like WhatsApp: WebSockets, presence, message ordering with sequence numbers, sent/delivered/read receipts and offline delivery, animated.
- Design a News Feed — Design a news feed like Twitter or Instagram: fan-out on write vs read, the hybrid for celebrity accounts, feed caches and cursor pagination, each animated.
- Design a Notification System — Design a notification system for push, SMS and email: queues per channel, retries with backoff, idempotency keys, user preferences, rate limits and templates.
- Design a File Storage Service (Dropbox) — Design a file storage and sync service like Dropbox: chunking, content hashing and dedup, metadata vs blob storage, delta sync, notifications and conflicts.
- Design a Ride-Hailing App (Uber) — Design a ride-hailing app like Uber: driver location updates, geohash and quadtree indexes for nearby drivers, dispatch and the trip state machine.
- Design a Web Crawler — Design a web crawler step by step: the URL frontier, BFS over links, per-host politeness, robots.txt, URL and content dedup, and distributed fetchers.
- Design Search Autocomplete (Typeahead) — Design a search autocomplete system: a trie with top-k suggestions per prefix, ranking by frequency, the offline rebuild pipeline, caching and sharding.