In this lesson · topic 7 of 7
Topic 7
Check the partitioning rules
4 min read
Predict first
Predict first
Predict first
Take away
- Partitioning cuts data by key so both storage and writes can spread.
- Range keeps neighbours together, which helps scans and hurts under sequential keys. Hash scatters them, which flattens sequential keys and makes scans touch every partition.
- Neither rule fixes a single hot key. Splitting a hot range helps until the partition is one key.
Sources
- Martin Kleppmann, Designing Data-Intensive Applications, O’Reilly, 2017. Chapter 6 covers partitioning, skew and hot spots.
- Fay Chang and colleagues, Bigtable: A Distributed Storage System for Structured Data, USENIX OSDI, 2006.
- James Corbett and colleagues, Spanner: Google’s Globally-Distributed Database, USENIX OSDI, 2012.
- David DeWitt and Jim Gray, Parallel Database Systems: The Future of High Performance Database Systems, Communications of the ACM, 1992.
- Giuseppe DeCandia and colleagues, Dynamo: Amazon’s Highly Available Key-value Store, ACM SOSP, 2007.
- Google Cloud documentation, Bigtable schema design best practices, a worked treatment of row keys and hotspots.