A ticket service may commit a reservation even when its response never reaches the caller. After a timeout, a retry may reach a different service instance. The service uses a shared transactional database. Which design best prevents retries for the same logical reservation from reserving additional seats?
Retry with the same reservation identifier, keeping completed identifiers only in the memory of the instance handling each request.
Retry with the same reservation identifier, recording its result atomically with the inventory change in the shared database.
Retry with a new reservation identifier each time, allowing every network attempt to be tracked as a separate operation.
Retry without a reservation identifier after a longer timeout, treating the longer wait as evidence that the original attempt failed.
Unlock full course notes by signing up
Compare storage placements
An archive contains 240 GB of unique data. Engineers compare three placements across three machines:
Full copies: each machine stores the entire archive.
One copy: equal subsets X, Y and Z are stored once, one subset per machine.
Order a majority-commit write
An inventory service runs as a cluster of five replicas: one leader and four followers. A write counts as committed once a majority of the five replicas hold it in their logs, and the client is told the write succeeded only after it is committed. Put the steps of a single successful write in the order they happen.
Preserve stock safety during a partition
East and West regions each hold a stock record showing one remaining unit of a product. Before communication failed, East alone received the durable, exclusive right to reserve that unit. West can acquire that right only through a completed handover in which East first stops using it.
The regions now cannot communicate or route requests to each other. Both remain operational, no requests were pending when communication failed, and no new stock arrives. East records reservations durably and prevents repeated use of its right.
Which proposed behaviours preserve the rule that at most one reservation may succeed for the remaining unit? Select all that apply.
Size read and write quorums
A user-profile store keeps every record on N=5N = 5N=5 replicas. A write succeeds once W=3W = 3W=3 replicas acknowledge it, and a read succeeds once R=3R = 3R=3 replicas reply; the reader returns the value with the newest version number among the replies. Assume every replica that is reachable responds.
Find, each as a whole number:
the largest number of replicas that can be unreachable while a write still succeeds;