Skip to content
ENExplore Calculators

Sharding Key Distribution Calculator

Work out sharding key distribution instantly with clear inputs, formula shown and shareable results.

About Sharding Key Distribution Calculator

Capacity in a sharded system is set by the hottest shard, not the average. The skew factor is the busiest shard's traffic share divided by the even share of 1/N, so 18 percent across 16 shards is nearly three times skew — meaning the cluster must be provisioned as if it were three times smaller. Skew usually comes from a low-cardinality or naturally hot key.

Formula

Shard skew

even share = 1 / shards; skew factor = hottest share / even share; hottest shard load = total rate x hottest share

Worked example

With the default values below, Sharding Key Distribution Calculator returns Hot-shard skew factor of 2.88. Change any input above and every figure here is recalculated in your browser.

Inputs used

Number of shardsaccepts 1–4,096
16
Total keysminimum 1
200,000,000
Share of traffic on the busiest shardaccepts 0.01–100 %
18 %
Total request rateminimum 0.01 req/s
30,000 req/s

Results

Hot-shard skew factor
2.88 x
Load on the busiest shard
5,400 req/s
Load per shard if perfectly even
1,875 req/s
Keys per shard
12,500,000

Step by step

  1. 1Values used
  2. 2Shard skew
  3. 3Hot-shard skew factor= 2.88 x
  4. 4Load on the busiest shard= 5,400 req/s
  5. 5Load per shard if perfectly even= 1,875 req/s
  6. 6Keys per shard= 12,500,000

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

How is hot-shard skew fixed?

Choose a higher-cardinality shard key, add a salt or bucket suffix to hot keys, or split the hot key's data across shards with a scatter-gather read.

Does consistent hashing solve skew?

It solves rebalancing on shard changes, not popularity skew. A single extremely popular key still lands on one shard however the ring is arranged.

Sharding Key Distribution Calculator | Calcrivo