Loading lesson path
System Design
The reusable primitives every design leans on: load balancing, caching, sharding, queues, consistency, and estimation.
A load balancer spreads traffic across interchangeable, stateless app servers so any instance can serve any request and failed nodes drop out cleanly.
Caching trades freshness for latency. A cache only helps when the read pattern is hot, the freshness tolerance is known, and the invalidation path is explicit.
Replication copies data for availability and read scaling; sharding splits data across nodes for write/storage scaling. They solve different problems and are often combined.
Choose storage by access pattern, not popularity. Relational databases give transactions, joins, and strong consistency; NoSQL stores trade those for horizontal scale and flexible schemas. Indexes ma…
A queue lets a request return immediately while slow, retryable work happens in the background. Workers must be idempotent and have bounded retries.
Under a network partition you must choose availability or consistency (CAP). Even without partitions, you trade latency against consistency (PACELC).
Distributed systems fail partially, so design for it. Bound every dependency call with a timeout, retry transient failures with capped backoff, trip a circuit breaker when a dependency is down, and d…
You cannot operate what you cannot see. Track the signals that reflect user experience — latency, errors, traffic, and saturation (the four golden signals) — and define SLOs so you know when the syst…
Rough numbers decide the architecture. Go from daily active users to QPS, storage, and bandwidth before choosing databases or caches.