System Design Overview
System design is how you make software that scales with demand and stays reliable under load.
You decide the structures—how components talk, how data flows, where state lives—and the trade-offs: consistency vs. availability, latency vs. throughput.
Proven patterns (load balancing, caching, queues, event-driven flows) and principles (loose coupling, clear boundaries, designing for failure) keep scaling and operations manageable.
The goal isn’t the most elaborate architecture; it’s one that fits the problem—reliable enough for your SLAs, scalable enough for growth, simple enough to reason about and operate.
This section gives you the patterns and vocabulary to design or review systems that need to scale and stay reliable.
In this section
Section titled “In this section”The list below follows a logical path: requirements and vocabulary first, then patterns, building blocks, and quick references.
- System Design Requirements — Establish what matters (scale, latency, consistency, etc.) and the vocabulary; requirement → pattern mapping.
- CAP Theorem — Why you can’t have consistency, availability, and partition tolerance at once; CP vs AP and how it shapes design choices.
- System Design Checklist — Map of what to think about: 10 areas so nothing is missed.
- Scalability Patterns — How scaling and stability work (horizontal vs vertical, stateless, queues, backpressure, load shedding); concepts before tech.
- Infrastructure Building Blocks — What types of infra exist and why each type exists.
- Optimization Quick Reference — “I have this pain → what do I add?” when they have a concrete problem.
- Redis vs Kafka: When to Use Which — One concrete either/or (and “both”) when that choice comes up.
Examples
Section titled “Examples”- Staged Design Examples — Stage model (MVP → Growth → Advanced), trigger tables, and how to pick an example.
- Example: Mobile app — Design in stages, from MVP to scale.
- Example: Chat / real-time — Real-time messaging, from MVP to scale.
- Example: Feed / timeline — Social feed, push vs pull, from MVP to scale.
- Example: Payments — Payments and financial systems, consistency and audit, from MVP to scale.
- Example: Search — Search and discovery, indexing and ranking, from MVP to scale.
- Example: Streaming / events — Event streaming, retention and replay, from MVP to scale.
- Example: Media / video — Video and music streaming, transcode and CDN, from MVP to scale.
- Example: Marketplace — Two-sided marketplace, listings and orders, from MVP to scale.
- Example: Analytics / reporting — Analytics and reporting, ingest to dashboards, from MVP to scale.
- Example: Collaborative editing — Collaborative document editing, sync and conflict resolution, from MVP to scale.
- Example: File sharing — File-sharing system, upload to sync, from MVP to scale.
- Example: Library management — Library management, catalog and inventory, from MVP to scale.
- Example: Ride-hail / matching — Real-time matching (ride-hail / delivery), from MVP to scale.
- Example: Geospatial / maps — Geospatial and maps (tiles, search, routing), from MVP to scale.
- Example: Game backend — Game backend (sessions, moves, matchmaking), from MVP to scale.
- Example: Warehouse / fulfillment — Warehouse and fulfillment (inventory, pick list, ship), from MVP to scale.
- Example: IoT / sensor ingestion — IoT and sensor ingestion (telemetry, alerts), from MVP to scale.
- Example: LLM / semantic search — LLM-powered and semantic search (embeddings, vector index), from MVP to scale.
- Example: Autocomplete / typeahead — Autocomplete and typeahead (prefix suggest, ranking), from MVP to scale.
- Example: Distributed cache — Distributed cache (sharding, replication, eviction), from MVP to scale.
- Example: Webhooks — Webhooks and outbound delivery (subscribe, deliver, retry), from MVP to scale.
- Example: URL shortener — URL shortener (create, resolve, redirect), from MVP to scale.
- Example: Electronic voting — Electronic voting (ballot, tally, anonymity), from MVP to scale.
- Example: Infrastructure / redundancy — Infrastructure and redundancy (compute, failover, deploy), from MVP to scale.
- Example: Parking / slot allocation — Parking and slot allocation (enter/exit, reservations, optional payment), from MVP to scale.