System Design Basics Cheat Sheet

Core system design concepts — scalability, availability, reliability, CAP theorem, consistency patterns, and fundamental trade-offs.

Last Updated: May 1, 2025

Core Concepts

ItemDescription
ScalabilityAbility to handle growth — horizontal (more machines) vs vertical (bigger machine)
AvailabilityPercentage of time operational — 99.9% = 8.76h downtime/year
CAP TheoremChoose 2 of 3: Consistency, Availability, Partition Tolerance
LatencyRequest time — P50 (median), P95, P99 (tail latency matters most)
ThroughputRequests per second — measured in QPS or RPS

CAP Theorem Choices

ChoiceYou GetBest For
CPStrong consistency during partitionsBanking, payments
APAlways available during partitionsSocial media, CDNs
CABoth when no partitionSingle-node databases

Design Process

ItemDescription
1. RequirementsFunctional + non-functional (scale, latency, durability)
2. EstimationQPS, storage, bandwidth — 1M DAU x 10 req/day = ~115 QPS avg
3. API DesignREST/GraphQL/gRPC — endpoints, request/response
4. Data ModelSQL vs NoSQL — schemas, indexes, partition keys
5. High-LevelBoxes and arrows — services, DBs, caches, queues
6. Deep DiveCritical components — SPOFs, bottlenecks

Key Tradeoffs

ItemDescription
Read vs WriteIndexes speed reads, slow writes. Caches add consistency issues.
Sync vs AsyncSync = strong consistency, higher latency. Async = eventual, better throughput.
SQL vs NoSQLSQL = ACID, joins, schema. NoSQL = flexible, horizontal scaling, BASE.
Monolith vs MicroservicesMonolith = simpler. Microservices = independent scaling, ops complexity.
Pro Tip: Start with a monolith and split when you have clear bounded contexts. Premature distribution creates complexity without the scale to justify it.