Data Centers: The Backbone of Modern Databases

Concept. Latency in a modern data center spans eight orders of magnitude, from a nanosecond on-chip to a hundred milliseconds across the planet. An algorithm's cost depends on which tier holds its data.

Intuition. A SELECT against a 10-billion-row Listens table doesn't run on one machine. It runs in a data center the size of a Costco, and the same byte can be a nanosecond away or a hundred milliseconds away depending on where it sits. Everything this course does about cost comes out of that gap.

Latency Tiers

On-chip is nanoseconds. Memory is hundreds of nanoseconds. Storage is tens of microseconds. Disk and the network next door are milliseconds, and the far side of the planet is a hundred of them. Every algorithm in this course is implicitly priced against that ladder; Storage & Paging puts exact numbers on the storage half.

Seven latency tiers on one axis, fastest to slowest: L1 cache 1 ns on-chip, RAM 100 ns, SSD 10 µs, network within the data center 500 µs, disk 10 ms, cross-region 50 ms, cross-continent 100 ms.

Figure 1. Seven tiers in one data center, fastest to slowest, from L1 cache at 1 ns to a cross-continent round trip at 100 ms. End to end is 100,000,000x, eight orders of magnitude, and a read from the wrong tier costs up to 10,000,000x more.

Why a Database Course Cares

Every cost model we will use, every page-count argument, every join algorithm, is shaped by this hierarchy. A query plan is a routing decision: which tier do you read from, how often, and in what order. Get the tier right and a billion-row query finishes in seconds. Get it wrong and the same query never finishes.


Google Data Centers

This is where BigQuery, Cloud SQL, and Spanner physically run.


Microsoft Azure Documentary

A behind-the-scenes tour of where your data physically lives.