System Design Interview Guide: Basics to Case Studies

System design interviews ask you to design a service on a whiteboard in about 45 minutes. This guide puts the lessons on this site in a sensible order: first how to approach the problem, then the building blocks, then data at scale, reliability, and finally full designs you can practise out loud.

Read the sections in order the first time. Later, jump to the building block you are weakest on.

Who it is for: Developers preparing for system design rounds, and anyone who wants to understand how large systems fit together.

46 lessons · Published by Jainik · Last updated

1. Start here: how to approach any design

  1. 1. System Design · 8 min
    What Is System Design? Start With Requirements

    Two teams build the same app; one collapses on launch day. The difference is not coding skill but system design — and good design always starts with requirements you can measure.

  2. 2. System Design · 10 min
    A 5-Step Framework for Any System Design Problem

    A blank whiteboard and “design Instagram” is terrifying without a plan. A five-step framework that works for any system design problem — requirements, estimation, API and data model, high-level design, deep dives — with a worked Pastebin example and the common mistakes to avoid.

  3. 3. System Design · 12 min
    Back-of-the-Envelope Estimation, Step by Step

    Five minutes of rough maths tells you whether you need one database or fifty. The numbers worth memorising, a seven-step recipe, and a full worked estimate for a photo-sharing app — with a calculator to try your own.

  4. 4. System Design · 8 min
    Latency, Throughput & Why p99 Matters

    An 80 ms average can hide a checkout that freezes for five seconds. Latency, throughput and Little's Law, why queues explode near full utilisation, and why at scale the p99 becomes what most users feel.

  5. 5. System Design · 8 min
    Availability and "The Nines" Explained

    “Five nines” is 26 seconds of downtime a month. What the nines really mean, why chained dependencies multiply away your availability while redundancy multiplies it back, and why fast recovery is often the cheapest nine you can buy.

  6. 6. System Design · 8 min
    Vertical vs Horizontal Scaling (and Why Stateless Wins)

    Bigger server or more servers? Vertical scaling is simple but hits a ceiling; horizontal scaling is nearly unlimited, but only once your app forgets everything between requests. Why stateless wins, and where state should live instead.

2. Building blocks

  1. 7. System Design · 10 min
    Load Balancers: L4 vs L7 and Balancing Algorithms

    One address, many servers, and one of them just crashed at 2 AM. How load balancers spread traffic, L4 vs L7, the balancing algorithms and when each wins, and why a “deep” health check can take everything down at once.

  2. 8. System Design · 8 min
    How CDNs Make the Web Fast

    Your servers are in Mumbai and a user in São Paulo waits three seconds. How CDNs copy content to edges near every user, how HTTP headers control what gets cached, and how to update files that live on hundreds of servers.

  3. 9. System Design · 10 min
    Caching Part 1: Where to Cache and Why

    Why ask the database the same question 10,000 times a second? What caches are, why they work so well, every layer you can cache at — browser to buffer pool — what to cache, and how Redis and Memcached compare.

  4. 10. System Design · 12 min
    Caching Part 2: Strategies, Eviction and Invalidation

    Adding a cache is easy; keeping it correct is hard. The six read/write strategies, why you delete rather than update on write, eviction policies you can try by hand, invalidation per data type, and the five ways caches cause outages.

  5. 11. System Design · 7 min
    Message Queues: A Gentle Introduction

    Placing an order shouldn't wait on the email provider — or fail because SMS is down. How message queues let you do the essential work now and everything else reliably a moment later, with acks, retries, dead-letter queues and back pressure.

  6. 12. System Design · 8 min
    How Search Works: The Inverted Index

    LIKE '%running shoes%' scans every row and still misses “running shoe”. How the inverted index flips documents into term → document lists, how analysis makes search forgiving, how BM25 ranks results, and how search scales and stays in sync.

  7. 13. System Design · 12 min
    SQL vs NoSQL: Picking the Right Data Model

    “SQL or NoSQL?” is the wrong question; the right one is “what shape is my data, and how will I read and write it?” The relational model and the four NoSQL families — key-value, document, wide-column and graph — what each is good at, the myths to drop, and a sensible default.

  8. 14. System Design · 8 min
    How to Choose a Database for Your System

    Hundreds of databases all claim to be fast and scalable. A practical seven-step process: the questions to ask, a sensible default, the signals that justify something else, prototyping with real load, and migrating safely when you got it wrong.

3. Data at scale

  1. 15. System Design · 12 min
    ACID Transactions & Isolation Levels

    Two people book the last seat; a transfer crashes halfway. What ACID really promises, the write-ahead log behind durability, the five anomalies isolation levels do (and don't) prevent, and the practical fixes for real race conditions.

  2. 16. System Design · 12 min
    Database Indexing: B-Trees and LSM-Trees

    Why an index turns 812 ms into 0.09 ms, and why it slows every write. How B-trees keep sorted pages updated in place, how LSM-trees append and compact for huge write rates, and how to design indexes from real queries.

  3. 17. System Design · 12 min
    Database Replication: Leader, Follower and Beyond

    One database server will eventually die, drown in reads, or be too far from your users. How leader-follower replication works, what replication lag does to real users, why failover is so hard, and how multi-leader and quorum systems handle conflicts.

  4. 18. System Design · 12 min
    Sharding: Splitting Data Across Machines

    Indexes tuned, biggest server bought, replicas added — and the primary still drowns in writes. How sharding splits one dataset across machines, the four strategies, how to pick a shard key, and the hard problems it creates.

  5. 19. System Design · 10 min
    Consistent Hashing, Visually Explained

    Add a fifth cache server to hash(key) % 4 and 80% of your keys move — the hit ratio collapses and the database falls over. How the hash ring moves only ~1/N of keys, why virtual nodes even out the load, and the alternatives.

  6. 20. System Design · 10 min
    CAP Theorem & PACELC Without the Confusion

    “MongoDB is CP, Cassandra is AP, pick two of three” — mostly misleading. What CAP really says about network partitions, why “CA” isn't a real option, and PACELC: the latency-vs-consistency trade you pay every day, even when nothing is broken.

  7. 21. System Design · 10 min
    Consistency Models: Strong, Eventual and In Between

    “Eventually consistent” can mean your own comment vanishes on refresh. Consistency is a spectrum, not a switch: linearizable, causal, session guarantees and eventual — what each promises, how conflicts get merged, and why clocks can't be trusted.

4. Reliability and operations

  1. 22. System Design · 10 min
    Single Points of Failure, Redundancy & Failover

    The site went down, and the culprit was none of the redundant boxes on the diagram but the one NAT gateway, the one DNS provider, or an expired certificate. How to hunt single points of failure, shrink blast radius, add redundancy that works, and fail over without split brain.

  2. 23. System Design · 10 min
    Timeouts, Retries & Backoff with Jitter

    One slow dependency with no timeout, plus clients that retry instantly, can take down an entire site. How to set timeouts from real latency, propagate deadlines, retry only what's safe, avoid retry amplification, and why backoff needs jitter.

  3. 24. System Design · 8 min
    Circuit Breaker & Bulkhead Patterns

    Timeouts limit how long you wait per call, but not how often you keep calling a service you already know is dead. How circuit breakers fail fast and test for recovery, how bulkheads stop one dependency exhausting everything, and how to design honest fallbacks.

  4. 25. System Design · 12 min
    Rate Limiting Algorithms Explained

    One buggy script calling 5,000 times a second can hurt every customer. How rate limiting protects your system and keeps usage fair: the five classic algorithms — with a simulator you can drive — distributed limiting in Redis, and how to tell clients to slow down.

  5. 26. System Design · 8 min
    Graceful Degradation & Load Shedding

    At 5× your planned peak, trying to serve everyone means serving no one. How to fail partially and on purpose: rank features and switch off the optional ones, reject excess work early and cheaply, shed by priority, and use waiting rooms for spikes you can see coming.

  6. 27. System Design · 10 min
    Logs, Metrics & Traces: The Three Pillars

    “Checkout took 20 seconds and failed” — but checkout touches eleven components. How logs, metrics and traces each answer a different question, how to instrument with OpenTelemetry, and how linking them takes you from “something's wrong” to “here's why” in minutes.

  7. 28. System Design · 10 min
    SLI, SLO, SLA & Error Budgets

    Product wants to ship daily; operations wants fewer changes; nobody agrees what “reliable enough” means. SLIs, SLOs and SLAs turn it into one number, and error budgets turn that number into a simple rule for when to move fast and when to slow down.

5. Worked designs

Each one follows the same steps: requirements, numbers, API, data model, architecture, trade-offs.

  1. 29. System Design · 15 min
    Design a URL Shortener

    The classic first case study, end to end. Requirements and estimates, the API and data model, how to generate short codes (hashing vs counters vs Snowflake IDs — with a live base62 encoder), a read path that serves 20,000 redirects a second, 301 vs 302, and click analytics.

  2. 30. System Design · 15 min
    Design a Rate Limiter

    Designing the rate limiter itself, as a real service: 100,000 requests a second, many rules per request, sub-millisecond checks. Requirements, estimates, a rule model, a Redis-backed gateway design, atomic Lua checks, hot keys, fail-open vs fail-closed, and multi-region.

  3. 31. System Design · 15 min
    Design a Notification System

    OTPs that must arrive in seconds, order updates, and a marketing blast to 20 million users in ten minutes — through push, SMS, email and in-app. A full design: API, preferences and templates, priority queues, channel workers, provider fallback, deduplication, rate limits and delivery tracking.

  4. 32. System Design · 18 min
    Design a Chat System

    Fifty million daily users, ten million online at once, 70,000 messages a second, one-to-one and groups, sent/delivered/read ticks and nothing ever lost. A full chat system design: WebSocket gateways, per-conversation sequence numbers, a wide-column message store, presence, offline push and sync.

  5. 33. System Design · 18 min
    Design a News Feed

    A hundred million users opening a feed ten times a day, and one celebrity post that must reach fifty million followers. A full news-feed design: fan-out on write vs on read, the hybrid that handles celebrities, feed caches, hydration, ranking, pagination and counters.

  6. 34. System Design Case Studies 2 · 25 min
    Design a Web Crawler

    The URL frontier, politeness, Bloom-filter dedup and trap defence, with a crawler simulation you can run.

  7. 35. System Design Case Studies 2 · 22 min
    Design a Key-Value Store (Like Redis or Dynamo)

    A write-ahead log and snapshots on one node, then a consistent-hash ring, N/R/W quorum and version vectors across many.

  8. 36. System Design Case Studies 2 · 22 min
    Design a CDN

    Edge caches, cache keys and TTL, purging, request coalescing and hit-ratio arithmetic, with an edge-cache simulation.

  9. 37. System Design Case Studies 2 · 22 min
    Design Trending Topics and Top-K Requests

    Streaming counts, sliding windows, a count-min sketch with a heap, and merging top-K across partitions.

  10. 38. System Design Case Studies 2 · 14 min
    Design a Unique ID Generator

    Auto-increment limits, UUID v4 and v7, ULID, Snowflake bit maths, clock skew and ticket servers, with a tested generator.

  11. 39. System Design Case Studies 2 · 20 min
    Design a Stock Exchange Matching Engine

    A price-time priority order book, a single-threaded sequencer, event-log replay, market data and risk checks, with a tested engine.

  12. 40. System Design Case Studies 2 · 20 min
    From One User to Millions: Scaling a Web App on AWS

    Ten scaling stages with trigger, change and cost, the metric that tells you, AWS services in plain words, and a queueing arithmetic demo.

6. Practise out loud

  1. 41. Practical Design Problems · 10 min
    How to Run a Practical Design Interview

    Requirements, API, data model, main algorithm, scale and failure, trade-offs. A frame you can repeat for every design question that follows.

  2. 42. Practical Design Problems · 25 min
    Design a URL Shortener (Long URL to Short URL)

    Making IDs, Base62, collisions, caching for read-heavy traffic, 301 vs 302 and analytics, custom aliases, expiry and stopping abuse.

  3. 43. Practical Design Problems · 18 min
    Design Pagination: Offset vs Cursor (Keyset)

    Why a large OFFSET is slow, how keyset paging works with a stable sort and a tiebreaker, opaque cursors and GraphQL connections.

  4. 44. Practical Design Problems · 20 min
    Design a Notification System (In-App, Push, Email)

    Polling, long polling, server-sent events and WebSockets, fan-out with queues, read state, user settings, retries and removing duplicates.

  5. 45. Full-Stack Questions · 30 min
    System Design Mock Interview: How to Talk Through It

    Say a system design answer out loud: the 45-minute clock, the first five minutes, drawing boxes, one-sentence trade-offs, failure questions, numbers and a full walkthrough with timings.

  6. 46. System Design · 15 min
    System Design in 15 Minutes: Recap & Cheat Sheet

    The whole series, compressed for the night before an interview: the framework, the numbers, the formulas, the nines, a one-screen recap of every part, “if you need X, use Y”, the big trade-offs, common problems and their fixes, and rapid-fire questions to test yourself.

More reading orders are on the guides page, and every series is listed on the home page.