Partition key
The part of a key that decides which partition, and so which machine, stores an item.
Definition
Distributed stores like DynamoDB and Cassandra hash the partition key to place data. A fast query must name it; a sort key (DynamoDB) or clustering columns (Cassandra) then order the items inside the partition. A key that receives most of the traffic overloads its partition (a hot partition), whatever the size of the cluster.
In practice
orders_by_customer uses customer_id as the partition key and created_at as the clustering column, so a customer's latest orders are one sorted read.
Learn it in context
Lessons that use this term.