Questions: Distributed Databases: Replication Models and Consistency

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A distributed database has N=3 replicas, configured with write quorum W=2 and read quorum R=2. Which of the following best explains why this guarantees that reads always see the most recent write?

ABecause W and R are both greater than 1, every replica is contacted for both reads and writes
BBecause W+R=4 > N=3, the write and read quorums must share at least one replica, and that replica has the latest write
CBecause reads outnumber writes (R=W=2, so they balance), consistency is maintained by majority voting
DThe W+R>N condition ensures that all 3 replicas confirm every write before it completes
Question 2 Multiple Choice

An e-commerce platform uses asynchronous replication for inventory updates. During a peak sale, the primary replica fails immediately after processing a purchase that reduced inventory from 1 to 0. What is the most likely consequence?

AThe transaction is rolled back because asynchronous replication detected the inconsistency
BThe inventory update is permanently lost if it had not yet been replicated; replicas may show inventory = 1, allowing another customer to purchase the last item
CThe system pauses all reads until the primary recovers, preventing any inconsistency
DAsynchronous replication automatically falls back to synchronous mode during failures to prevent data loss
Question 3 True / False

Synchronous replication provides higher availability than asynchronous replication because it guarantees most replicas are generally up to date.

TTrue
FFalse
Question 4 True / False

In a quorum-based system, increasing the write quorum W (while keeping N and R fixed) improves write durability but reduces write availability.

TTrue
FFalse
Question 5 Short Answer

Explain why the condition W + R > N guarantees that a read will always see the most recent write in a quorum-based replication system.

Think about your answer, then reveal below.