Sharding · Flashcard

What makes a good partition key?

medium

Answer

Many distinct values with fairly even load, so no shard gets hot, and a match with the access pattern, so most requests touch one shard. A key that spreads data perfectly but forces every query to ask all shards is a bad key.

Review this in your daily deck All cards in Sharding