Back to roadmap
Module 2 · Scale, Latency, CapacityDay 00920 min

Latency Numbers Every Engineer Should Know

The physics ceiling on what your system can do in a millisecond.

Day 009

Latency Numbers Every Engineer Should Know

L1
note
RAM
note
SSD
note
Same DC
note
Cross-region
note
Signal path
Order-of-magnitude latencies
L1
note
flow
RAM
note
RAM
note
flow
SSD
note
SSD
note
flow
Same DC
note
Memory hook

Latency Numbers Every Engineer Should Know: the physics ceiling on what your system can do in a...

Mental model

make the invisible limits visible

Design lens

Edge cache → freshness lag.

Recall anchors
ComputeStorageNetwork

Why it matters

Latency at each layer is a physical constant. L1 cache: ~1 ns. Main memory: ~100 ns. SSD random read: ~150 µs. Round trip same datacenter: ~500 µs. Cross-continent: ~150 ms. These numbers don't change much, and they bound what your design can ever achieve.

Deep dive

Within a millisecond you can: do ~1M memory loads, ~6 SSD random reads, or ~2 same-datacenter network round trips. That's it. If you need more, batch or parallelize.

Cross-region travel is dominated by light-speed: SF→London ~70 ms one way at best. No software change makes this faster — only colocation, anycast, or moving compute.

Disk seeks (~10 ms) on spinning drives are 100x worse than SSDs. If a design depends on millisecond p99 with HDDs, it's dead on arrival.

Demo / scenario

Design a feed read with strict 50ms p99.

  1. Budget: 50 ms total.
  2. TLS + edge ≈ 5 ms; app logic ≈ 5 ms; DB read ≈ 5 ms — leaves 35 ms.
  3. If user is 100 ms RTT from origin → impossible without an edge POP.
  4. Solution: cache feed at the edge or precompute and serve from a regional cache.

Tradeoffs

  • Edge cache → freshness lag.
  • Replication everywhere → cost balloon.
  • Geo-routing → ops complexity.

Diagram

L1
1 ns
RAM
100 ns
SSD
150 µs
Same DC
500 µs
Cross-region
70-150 ms
Order-of-magnitude latencies.

Mind map

Check yourself

Loading quiz…

Sources & further reading