Code Room
System designHardsd-g459
Subject Leader electionLevel Senior–Staff~50 minCommon in Distributed systems interviewsIndustries Technology

Question

A globally-distributed SQL database places each table-range's Raft leader in one region. A particular workload reads a hot, mostly-static reference range from all 6 regions but the range's leader is in us-east, so eu and ap readers pay a cross-region round-trip for every consistent read, and if us-east blips, leadership thrashes. The team wants (a) low-latency consistent reads from every region for this range and (b) to relocate leadership automatically toward wherever the write traffic actually is, without leadership flapping. Design the leadership + read strategy. Address how a follower can serve a consistent (not stale) read locally, and how you make leader placement adaptive without oscillation.

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.