Sharding Calculator
Estimate how many shards you need from storage ceilings and per-shard QPS, then apply growth and replica factor.
Sharding Calculator
Choose shard count from storage size and QPS capacity, then see per-shard load after growth.
Assumes relatively even key distribution. Hot keys, fan-out queries, and cross-shard transactions can invalidate perfect splits — design shard keys carefully.
Storage vs QPS Bound
Take the larger of:
- shards_storage = future_data_size ÷ target_max_size_per_shard
- shards_qps = future_peak_qps ÷ safe_qps_per_shard
If storage wins, you are disk/index bound. If QPS wins, you are CPU/connection/latency bound.
Shard Key Reality Check
Perfect math still fails with:
- Hot keys / celebrity users
- Scatter-gather queries across shards
- Cross-shard transactions
Pick a shard key with high cardinality and even access patterns. Plan resharding early — moving data later is the expensive part.
