System design

System design interview preparation

10 fundamentals · 5 case studies · animated request flows

0 / 15 done

Learn the building blocks first: how systems scale, where caches and queues fit, and what consistency really costs. Then practise on classic case studies, each worked through the way an interview goes: requirements, estimates, API, high-level design and deep dives. Step through the diagrams to watch a request move through the system.

Fundamentals

  1. Module 1

    How to approach a design interview

    A repeatable 45-minute framework: clarify requirements, estimate, sketch, deep-dive and discuss trade-offs.

    beginner 10 min 4 Q&A
  2. Module 2

    Scalability basics

    Vertical vs horizontal scaling, stateless services, latency vs throughput, and the path from one server to many.

    beginner 11 min 4 Q&A
  3. Module 3

    Load balancing

    L4 vs L7 balancers, routing algorithms, health checks, and avoiding the balancer itself becoming a single point of failure.

    beginner 10 min 4 Q&A
  4. Module 4

    Caching

    Where to cache, cache-aside vs write-through vs write-back, eviction, invalidation and stampedes.

    intermediate 13 min 5 Q&A
  5. Module 5

    Databases: SQL, NoSQL and replication

    Choosing a data store, indexes, ACID, read replicas and replication lag.

    intermediate 14 min 5 Q&A
  6. Module 6

    Sharding and consistent hashing

    Splitting data across machines: shard keys, range vs hash partitioning, hot spots and consistent hashing.

    intermediate 13 min 5 Q&A
  7. Module 7

    CAP theorem and consistency

    What CAP really says, PACELC, strong vs eventual consistency, and how to pick for each feature.

    intermediate 11 min 4 Q&A
  8. Module 8

    Message queues and async processing

    Decoupling with queues and logs, delivery guarantees, idempotency, ordering and back-pressure.

    intermediate 12 min 5 Q&A
  9. Module 9

    API design and rate limiting

    REST, gRPC and GraphQL, pagination, idempotency keys, versioning, and rate-limiting algorithms.

    intermediate 12 min 5 Q&A
  10. Module 10

    Reliability and observability

    Availability math, redundancy, timeouts and retries, circuit breakers, and the metrics that tell you something's wrong.

    advanced 12 min 5 Q&A

Case studies

  1. Design a URL shortener

    Short codes, ID generation, redirects at 100k reads per second, caching and analytics.

    intermediate 14 min 4 Q&A
  2. Design a distributed rate limiter

    Limit requests per user across many servers: algorithm choice, Redis counters, atomicity and failure modes.

    intermediate 12 min 4 Q&A
  3. Design a chat system

    One-to-one and group messaging: WebSockets, message storage, delivery receipts, presence and offline users.

    advanced 15 min 5 Q&A
  4. Design a news feed

    Fan-out on write vs read, the celebrity problem, feed caches, ranking and pagination.

    advanced 14 min 4 Q&A
  5. Design search autocomplete

    Top-k suggestions per prefix with tries, precomputed results, sharding and an offline aggregation pipeline.

    advanced 12 min 4 Q&A