Options
Why
The alternative, a local index on each shard, keeps writes on one shard but makes every lookup by email a scatter-gather over all shards.
Sharding · Multiple choice
user_id, and you add a global secondary index on email, itself partitioned by email. What do you pay for fast email lookups?The alternative, a local index on each shard, keeps writes on one shard but makes every lookup by email a scatter-gather over all shards.