News for hackers. Stuff that matters.
Re:You'll regret using natural keys by cogman10 on Wednesday June 05, 2024 @12:24PM (#40586893)
This is the great thing about using random bits for the lower bits. Because you are unlikely to use more than say 2^64 database nodes, any sharding algorithm will have to figure out how to spread a key with 64 bits (or however many bits are in your key) across n nodes.

Because of the random portion of the key, that means you'll get good distribution so long as the distribution algorithm isn't something stupid like relying solely on the highest order bits.

There are no comments on this comment yet.