</> MAANG.io

Expert

Design landmark systems in depth, from Dynamo, GFS, Bigtable and Kafka to payments and ads pipelines.

0 of 232 solved 0%

Section 11: The Escalation Gauntlet - Interviewer Deep-Dive Challenges

Executive Summary: The interviewer stops asking how the design works and starts trying to break it. There are seven attacks. Each answer names what is really being tested, answers with a number or a mechanism Sections 7 to 10 already built, then states the cost and the flip trigger. Several are won by refusing a premise: this store never offered strong consistency, and a timeout doesn't mean the write failed.

The interviewer leans back. "Okay, it survives. Step out of 2006 for the rest of this: I'll use what came later, and so can you. Now let me push on it."

The gauntlet: seven interview challenges (R + W > N is strong?, Why not LWW?, Why not Paxos?, Timed out but written, Hot key, 5,000 nodes, DC3 dark at peak), each probing a mechanism: R + W > N and DC3 dark at peak probe sloppy quorum and siblings; Why not LWW? and Timed out but written probe vector clocks and the cart merge; Why not Paxos? probes the Decision 1 availability choice; Hot key and 5,000 nodes probe partition placement and instance tuning.

Challenge 1: "R + W > N, So Reads Are Consistent"

"You run (3, 2, 2). Two plus two is more than three, so every read sees the latest write. Right?"

What they're really asking: do you know the textbook guarantee, and do you know when Dynamo gives it up?

You: "That overlap only holds when the R readers and W writers come from the same three home nodes. A sloppy quorum breaks that on purpose. Look at Dana's partition. With DC1 cut off, the phone's removal was acked by F and K. The laptop's gift card was acked by B and stand-in C. A phone read in that minute is answered by F and K, so R = 2 is met, and it can't see the gift card: the read set {F, K} and the write set {B, C} don't overlap. Even without failures, two concurrent writers both succeed as siblings. So the store promises eventual consistency plus conflict detection, never linearizability."

The senior line: "R + W > N tells you how likely a read is to be fresh. It isn't a guarantee. What Dynamo does guarantee is that conflicts get detected, not prevented."

Sign in to continue reading

The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.

Sign in to read the full lesson

Sign in to MAANG.io

Use your Google or Microsoft account — no password to remember.

Continue with Google Continue with Microsoft

Please accept the terms above to continue.