System Design Guide

Learn system design end-to-end — fundamentals, building blocks, HLD case studies, and LLD with design patterns.

A practical, opinionated guide to system design — for interviews, architecture work, and building real systems.


Pick Your Path


How the Sections Fit Together

How the Sections Fit TogetherFlowchart

Three Tracks


What You Get

System Design (HLD building blocks)

Fundamentals — what system design is, how to approach a problem, and the math (estimates, capacity planning). Theory: CAP, PACELC, consistency models, distributed consensus, gossip, vector clocks.

Building Blocks — load balancers, reverse proxies, caches (cache-aside, write-through, write-behind), CDN, message queues, pub/sub, sharding, consistent hashing, bloom filters, rate limiting, distributed locking, leader election.

Architecture — API gateways, BFF, service discovery, service mesh.

Communication — HTTP, REST, GraphQL, gRPC, WebSockets, SSE, webhooks.

Design Patterns (HLD) — circuit breaker, bulkhead, retry, idempotency, saga, CQRS, event sourcing, strangler fig.

Observability and Security.

HLD Case Studies — 25 designs

Real architectures with diagrams, data models, and trade-offs:

LLD & Patterns

Foundations — OOP principles, SOLID, UML diagrams, DRY/KISS/YAGNI, composition vs inheritance, coupling & cohesion.

22 GoF Patterns, organized by intent:

  • Creational — Singleton, Factory, Abstract Factory, Builder, Prototype
  • Structural — Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy
  • Behavioral — Strategy, Observer, Command, State, Chain of Responsibility, Template Method, Iterator, Mediator, Visitor, Memento

Concurrency — thread safety, producer-consumer, read-write locks, thread pools.

24 Machine-Coding Case Studies — interview-ready designs with class diagrams, code, and pattern usage:


Approach Cheat Sheet

For any system-design question, start here:

Approach Cheat SheetFlowchart
  1. Clarify — functional + non-functional requirements. Don't assume.
  2. Estimate — QPS, storage, bandwidth. Numbers shape everything else.
  3. API design — name the operations and their request/response shapes.
  4. Data model — what's stored, where, and how it's keyed.
  5. High-level architecture — boxes and arrows.
  6. Drill into bottlenecks — caching, sharding, async processing.
  7. Trade-offs — every decision has a cost; name it.

For LLD interviews: clarify → identify entities → relationships → pick patterns deliberately → handle concurrency → discuss extensibility.


Tips

  • Don't memorize — understand the trade-offs. The same component fits one problem and breaks another.
  • Estimate first — back-of-envelope numbers prevent over-engineering small systems and under-engineering large ones.
  • Name your patterns — "we use a circuit breaker because the downstream is flaky" is sharper than "we add error handling".
  • Practice writing, not just reading — pick a case study, draw it from scratch, then compare.