Code Room
System designHardsd-g444
Subject ConsensusLevel Senior–Staff~50 minCommon in Distributed systems interviewsIndustries Technology

Question

You must run a strongly-consistent (linearizable) sequence/ID-allocation service across 3 regions (us-east, eu-west, ap-south) on a Raft group with one replica per region. Naively, every committed write needs a round-trip to a majority, and the inter-region RTTs (us↔eu 90ms, us↔ap 200ms, eu↔ap 160ms) make p99 commit latency ~300ms+ when the leader is in ap-south — unacceptable for a 50k writes/sec allocator with a 50ms p99 SLO for clients in their home region. You may NOT weaken linearizability. Redesign so that the common-case write stays fast for the region issuing it, while still tolerating a full region loss. Discuss leader placement, batching, and any partitioning that buys you locality without giving up linearizable allocation.

What a strong answer looks like

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.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.