SkillByAIOpen interactive version →

Lesson 5 / 25

Latency Numbers and Their Implications

Orders of magnitude.

Memory, disk, network

Know rough orders of magnitude: memory access is nanoseconds, an SSD read is tens to hundreds of microseconds, a round trip within a data centre is around half a millisecond, and a cross-continent round trip is tens to over a hundred milliseconds. Implications: cache hot data in memory, avoid chatty cross-region calls, batch and parallelise network requests, and put content close to users with CDNs.

Approximate orders of magnitude

Commonly cited approximations, not measurements; real values vary by hardware and network.

L1 cache / main memory reference     ~1 ns / ~100 ns
read 1 MB sequentially from memory   ~a few microseconds
SSD random read                      ~16-150 microseconds
round trip within a data centre      ~0.5 ms
read 1 MB sequentially from SSD      ~0.1-1 ms
disk (HDD) seek                      ~2-10 ms
round trip between continents        ~70-150 ms

Count round trips

For a latency budget, count sequential network hops; five 20 ms calls in series already use 100 ms.

Quick check: Which is slowest?

  • A main memory reference
  • A round trip between continents
  • An SSD random read
  • A round trip within a data centre
Answer

A round trip between continents — Physics limits cross-continent latency.