1. Which key choice reduces hot-partition risk for sharded writes?
Hot spots happen when keys are sequential or skewed. Hashing spreads load evenly across shards. If locality is needed, combine a coarse bucket with a hash suffix to balance.
shard = hash(user_id) % N