CMD Guide
HomeSystem DesignGlossary & Cheat-Sheet

Systems Cheat-Sheet — Laws, Numbers, Capacity Chain & Failure Modes (Deep Dive)

The glossary lists terms and numbers; this companion gives the laws a senior is expected to derive on demand (Little's Law, Amdahl's, Gustafson's, the Universal Scalability Law, Moore's, Brooks's, Conway's, Metcalfe's, tail fan-out, the quorum caveat), the end-to-end capacity chain that ties numbers to a design, a quick capacity-anchors card, the consistency-model spectrum, and real definitions (with the fix) for the failure-mode vocabulary — so you can defend each under "but why?" pressure.

1. Little's Law: L = λ · W

In any stable system, the average number of items in the system L equals arrival rate λ times average time-in-system W. It's the #1 sizing tool. Thread-pool worked example: if you serve λ = 2000 req/s and each request occupies a worker for W = 50 ms = 0.05 s, then L = 2000 × 0.05 = 100 — you need ~100 concurrent workers (threads/connections) just to keep up, before any safety margin. Turn it around to find max throughput from a fixed pool: λ = L / W. It also sizes connection pools, in-flight buffers, and queue depths. No distribution assumed — it holds for any stable system.

2. The other laws every senior should know

LawWhat it saysWhy it matters in system design
Amdahl's LawMax speedup from N cores is bounded by the serial fraction s: Speedup ≤ 1 / (s + (1-s)/N). If 10% of the work is serial, the best possible speedup is ~10×, no matter how many cores you add.Tells you when throwing hardware at a problem stops helping; identify and shrink the serial bottleneck first.
Gustafson's LawIf the problem size grows with N, scaled speedup can approach N: S = N - s(N-1).Contrasts with Amdahl: when you can scale the workload (bigger data sets, more users), parallelism pays off even if the serial fraction is fixed.
Universal Scalability Law (Gunther)C(N) = N / (1 + σ(N−1) + κN(N−1)): contention σ caps speedup exactly like Amdahl; the coherence/crosstalk term κN(N−1) makes throughput peak and then fall as N grows. Worked retrograde example (σ=0.05, κ=0.001): C(10) ≈ 6.49, C(50) ≈ 8.47, C(100) ≈ 6.31 — throughput at 100 nodes is below 50 nodes.It is why a cluster can get slower when you add nodes: quorum chatter, cache invalidation, and lock coherence all grow ~N². Find σ/κ by fitting measured throughput at 3 fleet sizes; the retrograde region is traced in Latency vs Throughput.
Moore's LawThe number of transistors on a chip doubles roughly every two years; historically this meant single-thread performance grew predictably.Single-core gains have slowed; modern scaling is horizontal (more machines), which is why distributed-systems literacy is now mandatory.
Brooks's LawAdding people to a late software project makes it later because communication overhead grows as the team grows.Explains why "just hire more engineers" does not linearly increase velocity; architecture and team boundaries must be designed together.
Conway's LawOrganizations design systems that mirror their own communication structures.Use it deliberately: align team boundaries with service boundaries (bounded context) so the architecture and the org reinforce each other.
Metcalfe's LawThe value of a network is proportional to the square of its users ( possible connections).Explains network effects and viral growth; the flip side is that coordination and data-interdependence can also grow as , so partition carefully.

Trusted sources: Amdahl (1967), Gustafson (1988), Gunther Guerrilla Capacity Planning (2007), Moore (1965), Brooks The Mythical Man-Month (1975), Conway (1968), Metcalfe & the Ethernet-era formulation.

3. Tail-latency fan-out amplification

"Design for p99" isn't a slogan — it's arithmetic. A request that fans out to N backends and waits for all of them is fast only if every sub-call is fast: P(all fast) = (P_fast)^N. If each backend is fast 99% of the time, then at N=100 only 0.99^100 ≈ 37% of requests stay fast — 63% hit the tail. So a component's average latency is irrelevant to a wide fan-out; its p99 becomes the parent's typical latency. Defenses: minimize fan-out width, hedge/backup requests (take first of two), and set the SLO on p99, not the mean.

4. The quorum caveat: R + W > N is not linearizability

The cheat-sheet line "R + W > N ⇒ strong consistency" overstates it. R + W > N only guarantees the read set and write set overlap — a read touches at least one replica that saw the latest completed write. It does not give linearizability: two concurrent writes can still be accepted by different replica subsets and diverge (last-writer-wins clobbers one, or you get siblings) — the overlap says nothing about ordering concurrent operations. You need versioning + conflict resolution (vector clocks, LWW) or actual consensus (Raft/Paxos) for linearizability. Quote it as "quorum overlap ensures a read sees the last acknowledged write, not that concurrent writes are ordered."

5. The end-to-end capacity chain

Numbers only matter when chained to a decision: users → QPS → storage → shard/cache count. Worked: 10M DAU, each doing 20 actions/day → 200M actions/day ÷ 86,400 s ≈ 2,300 QPS average, ×~5 peak factor → ~12k QPS peak. If a shard sustains ~3k write QPS, you need ~4 shards for writes (+ replicas). Storage: 200M actions/day × 1 KB × 365 × 3 (replication) ≈ ~220 TB/yr → informs retention/tiering. Cache: if 90% hit ratio and a node holds the hot set, size the cache to the working set, not the whole dataset. The judgment is in the chain — each number forces the next design choice.

6. Capacity anchors — the numbers to know cold

AnchorRule of thumb
Seconds in a day~86,400 ≈ 10⁵ (use 10⁵ for mental math)
1 request/s≈ 100K/day ≈ 2.5M/month ≈ 30M/year
One app server~1K–10K simple QPS
Redis / in-memory store~100K ops/s
Postgres/MySQL simple reads~a few K – 50K QPS
SSD sequential~500 MB/s; 1 Gbps NIC = 125 MB/s
Latency ladderL1 ~1 ns → RAM ~100 ns → SSD random ~100 µs → same-DC RTT ~0.5 ms → HDD seek ~10 ms → cross-continent ~150 ms
Availability99.9% ≈ 8.8 h/yr; 99.99% ≈ 52 min; 99.999% ≈ 5 min
Availability compositionChain of dependencies: availability multiplies — two 99.9% hops in series = 99.8%. Redundancy: parallel replicas compose as 1 − (1−A)ⁿ — two 99% nodes = 99.99% (if failures are independent and failover works)
MTTF / MTBF / MTTRMTTF = mean time to failure (how long a component runs before failing); MTBF = MTTF + MTTR. Availability = MTTF / (MTTF + MTTR) — the design goal is to repair much faster than things fail (MTTR ≪ MTTF)

For the full drill card, see Numbers & Units You Must Know Cold.

7. Consistency models at a glance

ModelGuaranteeWhen to think about it
LinearizableEvery operation appears to take effect atomically at some point between invocation and response; all observers see the same total order.Bank balances, inventory, leader election — when stale reads are dangerous.
SequentialOperations appear to execute in some global order consistent with each process's program order.Formal reasoning; weaker than linearizable but still intuitive.
CausalCausally related operations are ordered; concurrent operations may diverge.Collaborative editors, comment threads, social feeds — users care about cause and effect.
EventualIf updates stop, all replicas converge to the same value.CDN caches, DNS, social like-counts — when staleness is acceptable.
Read-your-writesA process always reads its own most recent writes.User settings, posting then viewing — session-level guarantee.
Monotonic readsIf a process reads value v, later reads will not return values older than v.Mobile clients refreshing a timeline — no time-travel.

See also The Consistency Spectrum.

8. Failure-mode vocabulary (with the fix)

Takeaways

Related pages: Capacity Estimation, Numbers & Units You Must Know Cold, System Design Building Blocks, Leader & Follower, Quorum, Caching.

When NOT to treat numbers as laws

Interviewer follow-ups & drills

  1. Little’s Law use? concurrency ≈ arrival rate × latency — size threads/pools from that.
  2. Drill: cross-region RTT ~100ms — how many sequential cross-region round trips fit in a 200ms budget? ~2. (A same-DC RTT of ~0.5ms would fit hundreds — which is why chatty cross-region call chains, not same-DC ones, blow the budget.)

Re-authored/Deepened for this guide. Laws and formulas are standard engineering references; see Amdahl (1967), Gustafson (1988), Gunther (2007), Moore (1965), Brooks (1975), Conway (1968), and Little (1961).

🤖 Don't fully get this? Learn it with Claude

Stuck on Systems Cheat-Sheet — Laws, Numbers, Capacity Chain & Failure Modes (Deep Dive)? Open Claude, copy a block below, and it'll teach you this exact concept — visually and interactively.

🎨 Explain it visually

Build the mental picture, not memorization.

I just read a lesson on **Systems Cheat-Sheet — Laws, Numbers, Capacity Chain & Failure Modes (Deep Dive)** (System Design) and want to truly understand it. Explain Systems Cheat-Sheet — Laws, Numbers, Capacity Chain & Failure Modes (Deep Dive) from first principles using ONE vivid real-world analogy and a visual mental model — draw it as ASCII art or a clear step-by-step diagram — with a concrete example using real numbers. Then ask me one question to check I got the mental picture, and wait for my reply. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🤔 Walk me through it (interactive)

Socratic — adapts to where you're stuck.

Teach me **Systems Cheat-Sheet — Laws, Numbers, Capacity Chain & Failure Modes (Deep Dive)** interactively. Ask me ONE guiding question at a time, wait for my answer, and adapt to my confusion — build the idea with me step by step instead of explaining it all at once. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🧪 Quiz me & fix my gaps

Active recall exposes what you missed.

Quiz me on **Systems Cheat-Sheet — Laws, Numbers, Capacity Chain & Failure Modes (Deep Dive)** with 5 questions, easy to tricky, ONE at a time. Tell me if each answer is right; at the end, explain clearly what I got wrong and why. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🧠 Make it stick

Intuition + hook + flashcards for long-term memory.

Help me remember **Systems Cheat-Sheet — Laws, Numbers, Capacity Chain & Failure Modes (Deep Dive)** for the long term: give the one-sentence intuition, a memorable hook/mnemonic, a tiny worked example, and 3 active-recall flashcards (Q -> A). If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.

📝 My notes