What latency numbers and availability targets should every engineer know?
614 views
3 of 106
1
The problem
Question presented to candidate:
"Without looking anything up: roughly how long does a memory read take compared with an SSD read, a network round trip inside a datacenter, and one across an ocean? And if a service promises three nines, or four, how much downtime is that a month? How do those numbers change the way you design?"
What a strong answer should cover:
The latency ladder in orders of magnitude: L1 cache about 0.5 ns, main memory about 100 ns, random SSD read about 150 µs, datacenter round trip about 0.5 ms, disk seek about 10 ms, California–Netherlands round trip about 150 ms (the classic, dated ~2012 table)
What follows: avoid sequential network calls and random disk I/O on the request path; batch, parallelise, cache, and put data near users
Percentiles and tail latency: with fan-out, the slowest backend sets the response time (1% slow per backend means 63% of requests slow at 100 backends)
The nines: 99.9% is about 43 minutes a month, 99.99% about 4 minutes, 99.999% about 26 seconds; and the vocabulary SLI, SLO, SLA, error budget
Composition: dependencies in series multiply availabilities (always lower), redundant copies in parallel raise it; availability = MTBF / (MTBF + MTTR), so faster recovery buys nines
Code / implementation expected: No — the arithmetic is the answer; the example computes every number quoted.
fundamentals
estimation
2
Try it yourself
Sketch your approach before you read the solution. That is what the interview tests.
Stuck? Get a hint.
A short nudge toward the approach. It will not give the answer away.
3
Solution
Target Audience: Beginners — no hardware or operations background assumed.
Difficulty: Easy
Verified with: Node 22.22 and Python 3.12 (the calculator prints the same output in both).
How to read this doc: Every idea is explained in plain language first, then tagged with 📌 Interview term: so you also learn the exact words an interviewer expects. Every derived number was computed by the example program; the Verified section quotes its full output.
1. Why This Even Matters — A Story First
The famous latency table uses nanoseconds, which mean nothing to a human. So stretch time: pretend that reading from the CPU's L1 cache — the fastest memory there is — takes one second. The example program does that conversion:
0. If an L1 cache read (0.5 ns) took one second
main memory read 200 seconds
round trip in one datacenter 1
The solution is hidden so you can try first
13 min read · 11 sections
4
Read the code
Nines, dependency chains, error budgets and tail latency