Sharding · Multiple choice

Users are sharded by user_id, and you add a global secondary index on email, itself partitioned by email. What do you pay for fast email lookups?

hard Databases Consistency

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.

Review this in your daily deck All cards in Sharding