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
System Design
Fundamentals, components, communication, security, observability
HLD Case Studies
25 real-world architectures: Twitter, Uber, Netflix, Stripe, ...
LLD & Patterns
OOP, 22 design patterns, concurrency, 24 machine-coding case studies
How the Sections Fit Together
Three Tracks
Beginner — start with fundamentals
What is system design → scalability → CAP → consistency → microservices
Interview prep — drill case studies
Pick a case study a day. URL shortener → Twitter → Uber → Stripe.
Engineer on the job — pattern reference
Look up the right pattern for the problem in front of you.
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:
- Foundational: URL Shortener, Pastebin, Rate Limiter, Typeahead, Web Crawler
- Social & Messaging: Twitter, Instagram, WhatsApp, Slack, News Feed, Notification System
- Streaming & Video: Netflix, YouTube
- Marketplace & Logistics: Uber, Amazon
- Fintech: Stripe, Coinbase
- Storage & Collaboration: Google Docs, Google Drive, Dropbox Sign
- Gaming & Booking: Chess.com, LeetCode, Ticket Booking
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:
- Games & Puzzles: Tic-Tac-Toe, Snake & Ladder, Chess
- Booking & Reservation: Movie Booking, Hotel Booking, Car Rental, Meeting Scheduler, Airline Management
- Devices & Systems: Parking Lot, Elevator, Vending Machine, ATM System, Traffic Signal
- Apps & Services: Splitwise, Food Delivery, LinkedIn Connections, Stack Overflow, Online Shopping Cart, Library Management
- Infrastructure: Logger, LRU/LFU Cache, Rate Limiter (LLD), File System, Inventory Management
Approach Cheat Sheet
For any system-design question, start here:
- Clarify — functional + non-functional requirements. Don't assume.
- Estimate — QPS, storage, bandwidth. Numbers shape everything else.
- API design — name the operations and their request/response shapes.
- Data model — what's stored, where, and how it's keyed.
- High-level architecture — boxes and arrows.
- Drill into bottlenecks — caching, sharding, async processing.
- 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.