Layer 3 · Go deeper · 8 min
Go deeper
Size it, build it, then make the calls an interviewer will push you on.
Back of the envelope
Size it up
Tap through each step of the arithmetic.
How much of a 99.99% year can one regional incident eat?
A region turns unhealthy. How long until clients move?
How many servers survive the loss of one of three regions?
Build-up · 6 steps
Evacuate a home region, step by step
One Mumbai-homed user travelling in Germany, through a normal day and an unplanned evacuation of Mumbai to its async partner, Singapore.
Step 1 of 6
Every user has one home
Mumbai owns User 42’s writes and ships them asynchronously to Singapore, its partner. Each record still has a single writer, so there are no conflicts, and most users write in their own region.
4 interview moments
You’re the candidate
The interviewer pushes on the hard parts. Pick an approach and see how it holds up.
Deep dive 1 of 4
Interviewer
“Every user is in India and an RTO of a few hours is fine. The CTO wants active-active. What do you propose?”
Your move. Pick an approach:
Deep dive 2 of 4
Interviewer
“Signups write to a DynamoDB global table in every region, in its default multi-writer mode. How do you keep usernames unique?”
Your move. Pick an approach:
Deep dive 3 of 4
Interviewer
“A user’s wallet is debited from phones in two countries at once, and every region accepts writes. How do you keep the balance right?”
Your move. Pick an approach:
Deep dive 4 of 4
Interviewer
“Three regions carry 50%, 30% and 20% of traffic. The 50% one fails over to its nearest neighbour. How do you size them?”
Its nearest neighbour is the 30% region.
Your move. Pick an approach: