Latency Numbers Every Engineer Should Know
Compare CPU, RAM, Redis, SSD, and cross-continent network speeds at a glance.
In plain words
Reading from memory is like grabbing a pen from your pocket; reading from disk is walking to another room; crossing an ocean over the internet is flying to another country.
Think of it like…
If 1 CPU cycle takes 1 second (a heartbeat), reading RAM takes ~4 minutes, reading an SSD takes ~4 days, and sending a packet from US to Europe takes ~4 years.
Theory & how it works
Why sequential calls kill latency
If one user page load needs 20 sequential database queries of 5 ms each, the user waits 100 ms just for the database - before rendering or network travel. Batching into 1–2 queries or running independent calls in parallel drops that to 5–10 ms.
Similarly, chatty microservices (Service A → B → C → D → DB) stack network hops and tail latency quickly.
Median (p50) vs. Tail Latency (p99)
If 99% of requests finish in 10 ms but 1% hit garbage collection or a cold disk seek and take 500 ms, a user whose page loads 20 API calls has almost a 1 in 5 chance of hitting a slow 500 ms call!
Always measure p95 and p99 latency, not just averages.
Key points & practical guide
Summary checklist
- RAM (~100 ns) is thousands of times faster than network/SSD (~0.5–1 ms)
- Speed of light in fiber limits cross-continent RTT to ~100–150 ms
- Parallelize independent calls and keep hot data close to the user (CDN + cache)
When to use it
- Explaining why you added a cache, CDN, or batch query
- Debugging why a page feels slow despite low CPU usage
Watch out for
- Making N+1 sequential queries in a loop
- Reporting only average latency and ignoring p99