Interview's MateSystem Design
Interview's Mate

System Design

Architecture & trade-offs

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
All topics/Back-of-the-Envelope Estimation
FUNDAMENTALS & NETWORKING · SUBTOPIC

Latency Numbers Every Engineer Should Know

Compare CPU, RAM, Redis, SSD, and cross-continent network speeds at a glance.

BeginnerPart of Back-of-the-Envelope Estimation
Practice in AI HLD
Subtopics in Back-of-the-Envelope Estimation (3)
OverviewQPS & Peak MathStorage & BandwidthLatency Numbers

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.

Loading interactive diagram
Loading interactive exercise

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

Quick check

Loading quiz
Previous subtopic
Storage, Bandwidth & Cache Sizing
Back to overview
Full Back-of-the-Envelope Estimation Lesson