You don't need exact numbers. You need the order of magnitude, because the gaps between them are huge, and those gaps explain most design decisions.
| Operation | Roughly |
|---|---|
| Read from memory (RAM) | 100 ns |
| Random read from an SSD | 100 µs (1,000× slower than RAM; fast NVMe drives manage 10–20 µs) |
| Round trip inside one data centre | 0.5 ms |
| Seek on a spinning hard disk | 10 ms |
| Round trip to another continent | 150 ms |
Units, for reference: 1 ms = 1,000 µs = 1,000,000 ns.
A human-sized way to feel it: if a memory read took one second, an SSD read would take about 17 minutes, and a round trip across the ocean would take about seventeen days.
What the gaps tell you
- Memory beats disk by a mile. That's why caches (Redis, Memcached) keep hot data in RAM.
- The network is slow, distance is slower. A round trip across the world costs more than thousands of local operations. That's why CDNs put copies of content near users, and why one page that makes 20 calls to a server overseas feels sluggish.
- Calls add up. A page that makes 10 sequential database calls at 1 ms each spends 10 ms just waiting. Batching them or running them in parallel is often the easiest speed-up.
- Sequential beats random. Disks, even SSDs, read big continuous chunks far faster than scattered small pieces. Logs and many databases are designed around this.
Key idea: RAM ≈ 100 ns, SSD ≈ 100 µs, same data centre ≈ 0.5 ms, cross-ocean ≈ 150 ms. Keep hot data in memory, keep data close to users, and avoid long chains of network calls.