Problem Statement
Why are global secondary indexes hard in sharded systems?
Explanation
A single logical index may receive updates from many data shards, creating skew and coordination cost. Maintaining global order and atomicity is complex.
Common mitigations: local per-shard indexes plus scatter-gather reads, or an async global index with eventual consistency.
Code Solution
SolutionRead Only
email→user_id index shard must absorb writes from all user shards
