Question
Design the sharding and data-placement strategy for a global payments platform that must satisfy data-residency law: a user's transaction data must physically reside in their home jurisdiction (EU data in EU, India data in India, etc.), while still supporting cross-border payments (an EU user pays an India merchant) and global fraud analytics. ~500M users, 30k tx/sec peak, strong consistency required within a single payment. Describe the partition key and placement policy, how routing works, how cross-border transactions stay consistent, and the central trade-off.
Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.