Partition keys

Partition keys are the first part(s) of the primary key. Their main job is to determine which node(s) a piece of data must be written to and read from. When we talk about ensuring that a query can be served by a single node, we mean ensuring that query operates on a single partition key. When a query is processed by Cassandra, the partition key is hashed to produce a token number. This token number is then checked against the token ranges that each node is responsible for.

Get Seven NoSQL Databases in a Week now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.