Chapter 29: Resources
The planetary scale computer runs on physical resources: compute (processors that execute instructions), memory (fast storage for active data), persistent storage (slow storage for durable data), and network (links that connect everything together). Understanding these resources — their characteristics, limits, and costs — is essential for designing efficient systems.
Each resource type has a hierarchy of speed and capacity. For compute: registers, L1 cache, L2 cache, L3 cache, main memory, and disk, each step being roughly an order of magnitude slower and larger than the previous. For storage: NVMe SSDs, SATA SSDs, spinning disks, and tape, spanning from microseconds to seconds in access time. For network: loopback, local network, data center network, wide area network, and intercontinental links, spanning from microseconds to hundreds of milliseconds in latency.
Resource costs differ by orders of magnitude. A CPU cycle costs effectively nothing; a disk I/O costs milliseconds; a cross-continent network round trip costs hundreds of milliseconds. Our caching service exploits this hierarchy by keeping frequently accessed data in memory (nanoseconds) rather than fetching it from storage (milliseconds) or a remote service (tens of milliseconds).