Skip to main content

Partition

A partition is a slice of a store's keyspace. Keys hash into partitions, each partition is owned by one node at a time, and partitions carry stable code-word names so you can follow them across the cluster.

What a partition is

A partition is the unit of ownership and replication within a store. The store's keyspace is divided into partitions; each key belongs to exactly one partition, and each partition is owned by exactly one node at a time — its primary — plus zero or more replicas on other nodes. Splitting the keyspace this way is how a store scales past what a single node can hold and serve.

From a key to a partition

Routing a key to a partition is deterministic, so every client computes the same route without coordinating. It happens in two steps.

  1. Key to segment. Every key is hashed into one of a fixed number of segments (hash slots). A given key always lands in the same segment.
  2. Segment to partition. Segments are grouped into partitions. A partition owns a contiguous set of segments.

Segments, not individual keys, are the thing mapped to partitions. That is why rebalancing moves segments between partitions and nodes rather than rehashing keys — the keys travel with their segment untouched.

Partition count

You do not usually set an absolute partition count. You set partitions per node, which defaults to 1, and the total is derived as partitions per node × live nodes. The total is recalculated on every membership change, so it tracks the shape of the cluster rather than freezing at creation time.

  • Production topology keeps the default of one partition per node.
  • Local testing raises partitions per node — for example, 4 — so you can observe partition-aware behavior such as segment routing and scale-out rebalancing on a single machine.

Code-word names

Each partition is identified by a stable code wordAmber, Onyx, Jade, Opal, Topaz, and so on — rather than a bare number. The word is derived from the partition's stable, monotonic serial, so the same partition keeps the same word in every process and across restarts and ownership changes. The word list is deliberately non-geographic (gems, metals, trees, birds, weather, stars, and the like) and is collision-free within a 500-word cycle.

The point is operational: in the console and in diagnostics you can follow Amber as it moves from one node to another during a failover or rebalance, instead of correlating anonymous partition indexes across snapshots.

Partition versus the terms readers confuse it with

A partition is a logical slice of data, which distinguishes it from the process that holds it and from a redundant copy of it.

  • A partition is not a node. A node is a process; a partition is data the node holds. One node can hold several partitions.
  • A partition is not a replica. A replica is a copy of a partition on another node. The partition is the thing; its replicas are additional copies of it.
  • A partition is not a store. A store is the whole keyspace; a partition is one slice of it.
tip

The console's Nodes view shows which partitions each node holds — which it owns as primary and which it keeps as a replica — by code word.

Next steps