Definition · ShardA shard is a disjoint piece of a dataset, together with the node or nodes that serve it. Every key belongs to exactly one shard, and the rule that decides which is the partitioning function. A shard is not a replica: a replica is a copy of a piece, a shard is a piece. Splitting is this course; copying is “Replication and Consistency”.
Two independent questions decide how many shards you build, and they are asked of different resources. The first is about throughput: how many nodes does it take for the peak request rate, divided among them, to sit under the utilisation you are willing to run at? The second is about bytes: how many nodes does it take to hold the dataset once every item has been written RF times?
load N_load = ⌈ λ_peak / (c · ρ_target) ⌉
storage N_storage = ⌈ D · RF / per-node ⌉
the count N = max(N_load, N_storage)
λ_peak = 120 000 /s c = 8 000 /s ρ_target = 0.65
D = 48 TB RF = 3 per-node = 4 TB
N_load = ⌈ 120 000 / 5 200 ⌉ = ⌈ 300/13 ⌉ = ⌈ 23.08 ⌉ = 24
N_storage = ⌈ 144 TB / 4 TB ⌉ = ⌈ 36.00 ⌉ = 36
N = max(24, 36) = 36
The RF in the storage line is the whole of that constraint. A 48 TB dataset at three copies is 144 TB of stored bytes, and it is the 144 that has to fit. Dropping the factor gives 12 shards instead of 36 — a fleet a third the size, sized against a number that never existed on any disk.
Example · The same fleet, one constraint at a timeAt the numbers above, load asks for 24 and storage asks for 36, so you build 36 and storage binds by 12 shards. Hold the storage figures and take the peak to 200 000 /s: load now asks for ⌈200 000/5 200⌉ = ⌈38.46⌉ = 39, storage still asks for 36, and load binds by 3. Hold the load figures and take the dataset to 20 TB: storage asks for ⌈60/4⌉ = 15 and load binds by 9. Nothing about the method changed; which constraint won changed twice.
What the slack tells you, and what no slack tells you
At 36 shards each node serves 120 000/36 = 3 333 /s against a capacity of 8 000 /s, which is 41.67% — well under the 65% target that produced the load ceiling. Request traffic could grow by more than half before load starts to bind, and that is a real answer to “when do we reshard?”.
Storage at the same count has no slack at all. Each node holds 144 TB/36 = 4.00 TB of a 4 TB node, because the storage ceiling happened to land on a whole number. A dataset that grows by one byte adds a shard, and the lab shows this by moving the dataset slider a single terabyte. A ceiling that comes out exact is the least comfortable answer this arithmetic can give.
Where the load ceiling came from
The load line is not new. “From a Request's Cost to a Machine Count” derives it from one request's cost and one machine's capacity, and everything this lesson adds is the second constraint and the maximum. If the utilisation target in it looks arbitrary, “The Knee: Response Time vs Utilisation” is where the number comes from: the wait rises without bound as ρ approaches 1, so the target is chosen on the flat part of that curve and then divided into.
Both ceilings are computed as exact fractions in the lab and rounded only at the ceiling itself, which matters more than it sounds: 300/13 is 23.076923…, and a calculation that rounds to 23.1 before taking the ceiling still gives 24, while one that rounds to 23 gives 23 and under-provisions the fleet by a node.