All simulators

Sharding calculator

Work out shard counts from data size, growth and write load.

Data

2 TB

Load

20K

150K

The rest is headroom for spikes, compaction, backups and the time it takes to add shards.

One key lives on one shard, however many shards you have.

You need 8 shards and 24 nodes

  1. Data after 24 months: 2 TB + 24 x 150 GB = 5.6 TB.
  2. Shards for storage: 5.6 TB / (1 TB x 70%) = 8.
  3. Shards for writes: 20K / (5K x 70%) = 6.
  4. Take the larger: 8, limited by storage.
  5. Reads per shard: 19K per second, which needs 3 nodes per shard (at least the replication factor, assuming replicas serve reads).
Data per shard
700 GB
Writes per shard
2.5K/s
Hottest shard writes
2.9K/s
Storage runway
24 months

This is a starting point for an interview, not a capacity plan. Real limits depend on row size, indexes, query mix and hardware, so state your per-shard assumptions out loud.