Problem Statement
Explain how CQRS and read replicas help balance CAP trade-offs in a global product catalog.
Explanation
Split write and read concerns. A primary region handles consistent writes and emits events. Downstream read models and geo replicas are built asynchronously for low-latency reads near users. During partitions, writes may be constrained to the primary (CP), while reads use replicas with eventual or bounded staleness (AP). Clear freshness headers and cache hints set user expectations. Backfill and replays keep read models correct over time.
Code Solution
SolutionRead Only
Write → Event Bus → Regional Read Model → CDN/Cache
