Skip to content

Instantly share code, notes, and snippets.

@bisho
bisho / DIVISORS.md
Last active April 16, 2024 10:12
Tool to help choosing a great # of shards

Tool to help choosing a great # of shards

What is this for?

This tool finds numbers with a high number of divisors. Having a lot of divisors is a property that makes them a great choice as the number of partitions to use for sharding.

It also has the concept of "usable divisors", those that provide an increase greater or equal to some % (20% by default). Rebalancing has some operational costs and risks, so you usually wouldn't want to rebalance to achieve less