A global retailer wants a single product catalogue with sub-100ms writes from anywhere and strong consistency. Assess.
Show the full answer Hide the answer
What the interviewer is testing
Whether you can identify a requirement that physics forbids and turn it into a productive conversation.
The physics
Strong consistency across regions requires coordination — a quorum acknowledgement or a leader round trip. Light takes roughly 60 ms to cross the Atlantic and return in fibre, before any processing.
Sub-100 ms globally consistent writes from anywhere is not achievable. Saying so plainly is the first contribution.
Google's Spanner does achieve external consistency globally, and it does so by deliberately waiting out clock uncertainty on commit — adding latency, not removing it, and using GPS and atomic clocks to keep that uncertainty small. It pays the trade explicitly rather than evading it.
The decomposition
Catalogue is not one workload. Ask which operations need what:
Reads — the overwhelming majority. Serve from a local replica, eventually consistent. Sub-100 ms easily, from anywhere.
Merchandising edits — a product description, an image, a category. Low volume, and the editor is in one place. Write to a home region; 200 ms is imperceptible for an editing action.
Price changes — need to propagate promptly and rarely need global strong consistency at the moment of write.
Inventory — the one with a genuine global invariant, and the one where the requirement should be concentrated.
Almost everything is fast; the small set needing coordination is slower, and users tolerate a slower confirmation far better than slow browsing.
The resolution that usually works
Regional partitioning by home region. Each product or each seller has an authoritative region. Writes are local and strongly consistent within it; reads are local everywhere from replicas. There is no cross-region write coordination because no record has two possible writers.
This resolves the conflict entirely for most catalogue workloads and is under-used.
What a strong answer adds
Presenting it as a costed menu rather than a refusal: what each option delivers, what it forbids, and what it costs. The stakeholder asked for both because nobody had shown them the trade.
Common weak answers
Accepting the requirement and hoping. Multi-primary with last-write-wins, which silently discards edits.