Balanced Shard Redistribution Calculator
How does adding nodes change ideal shard counts and average data per node?
Method, formula and assumptions
After expansion, balanced nodes hold floor(shards/nodes) or ceil(shards/nodes) shards. To minimize placement on new nodes, allocate remainder shards to old nodes first; unavoidable remainder beyond old-node count goes to new nodes.
Input definitions and supported units
- Equal-sized primary shards: Whole-number count, from 1 to 1000000; must be positive.
- Current nodes: Whole-number count, from 1 to 10000; must be positive.
- Nodes being added: Whole-number count, from 0 to 10000; zero is supported where the stated method permits it.
- Total primary data (GB): Measured or assumed numerical value, from 0 to 1000000000; zero is supported where the stated method permits it.
Worked example with answer
120 equal primary shards across four old plus two new nodes balance at 20 shards each. At least 40 must land on new nodes; 600 GB averages 100 GB per node.
How to use the results
The new-node placement result is a lower bound under perfectly balanced equal-size placement, not a specific migration schedule or exact transfer-byte count.
Results retain full precision internally and display up to four decimal places. Very small nonzero results use scientific notation rather than appearing as zero. Check the labels before comparing values across units.
Limitations and references
Excludes replica shards, unequal shard sizes, placement constraints, ongoing writes and disk watermarks. Logical primary-data balance is not physical storage balance.
The method is a self-contained arithmetic, geometric or explicitly stated mathematical model. There are no imported tariffs, empirical presets or equipment specifications; measured values and allowances must come from your own process.
Related planning tools
Creator & reviewers
Creator persona
- Riley ChenTime planning & productivity
Reviewer personas
- Casey RowanUnits, conversions & measurement
- Devon ShawFormula & assumptions review