The Computing Series

Thread Activation

This chapter activates T1 (Data Structures) and T8 (Distributed Systems) simultaneously.

T1 originated in Book 1, Chapters 9–15 with sets, functions, and sequences — the mathematical structures that describe how data is organized. In Book 2, Chapter 15, consistent hashing was introduced as a technique for mapping keys to nodes with minimal disruption when the set of nodes changes. Sharding is T1 at database scale: the choice of how to partition a key space determines query expressiveness, rebalancing cost, and hotspot risk.

T8 (Distributed Systems) makes its first full appearance in this chapter. Every partition decision is a distributed systems decision: which machine holds which data, how requests are routed, and what happens when a machine fails. The routing map that tells a client which shard owns a given key is a coordination problem. The rebalancing that happens when a new node joins is a data movement problem. Both threads run through every chapter in the second half of this book.


Read in the book →