advanced 2 min answer

Product requires strong consistency and p99 latency under 100 ms for a globally distributed user base. Both are non-negotiable. What do you do?

tradeoffsconsistencyrequirements
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 back in fibre, before any processing. A globally distributed quorum write cannot complete in under 100 ms for users far from the quorum.

Both requirements cannot hold simultaneously as stated. Saying so plainly is the first contribution.

The productive move: decompose

The requirement is almost never uniform across the system. Ask which specific operations need strong consistency, and it is usually a small set:

Operation Consistency needed Latency achievable
Read product catalogue Eventual Local, fast
Read own profile Read-your-writes Local, fast
Add to basket Eventual Local, fast
Check inventory availability Approximate Local, fast
Commit an order against inventory Strong Cross-region, slower
View order history Eventual Local, fast

Almost everything is fast; the one operation genuinely needing a global invariant is slower — and users tolerate a slower confirmation step far better than a slow browsing experience.

The other resolutions

Partition by region. Each user's data has a home region where it is strongly consistent, and they are routed there. Strong consistency locally, no cross-region coordination, fast for everyone in their own region. This resolves the conflict entirely for most consumer systems and is under-used.

Reservations rather than commitments for contended resources, so the fast path takes a local hold and the slow global confirmation happens asynchronously.

Relax the latency target for the specific operation, having established that it applies to one step rather than to everything.

What a strong answer adds

Presenting it as a menu with what each option costs and forbids, rather than as a refusal. The stakeholder stated both requirements because nobody had shown them the trade; showing it lets them choose.

Common weak answers

Accepting both and hoping. Choosing eventual consistency unilaterally without surfacing the decision.