Question
Design a globally-distributed message broker that replicates topics across 3 regions (US, EU, APAC) so producers and consumers in any region get low-latency local reads/writes, the system survives a full region outage, and consumers can fail over to another region without reprocessing or losing messages. Some topics need strict per-key ordering globally; most just need it per-region. Cross-region links have ~150 ms latency and occasional partitions. How do you replicate, preserve ordering, and handle failover and offset translation across regions?
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.