Database / Google Spanner Database Interview questions
What happens when a leader region becomes unavailable in Spanner?
In a multi-region configuration, each split's Paxos group has replicas spread across the configured regions, with the leader typically hosted in the designated "leader region" for low write latency. If that region becomes unavailable, whether from a network partition or an outage, the affected Paxos groups detect the loss of the current leader once its lease expires and run a new leader election among the surviving replicas in the other regions.
Because commits only require a majority quorum, not the original leader region specifically, a multi-region configuration (typically using a 2-2-1-region-style replica layout) can still form a majority from the remaining regions and continue accepting writes, just with higher latency until the new leader is elected and located farther from application traffic that was tuned for the old leader region. Reads against read-only replicas in unaffected regions are largely unaffected throughout, which is why multi-region configurations carry a 99.999% availability SLA: the system is designed to survive a full regional outage without becoming unavailable, at the cost of temporarily elevated write latency during the transition.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
