Grokking Modern API Design Interview
Vote
0% completed
Concurrency and Conditional Requests
Two support agents read the same order.
Agent A changes the shipping instruction. Agent B changes the contact phone number. Each client sends a representation based on the copy it read.
If B writes last, B's stale copy may restore the old shipping instruction. Both requests return success. One person's work disappears.
This is the lost update problem. The API needs a way for a writer to say:
"Apply this change only if the resource is still the state I read."
HTTP provides that condition through an ETag and If-Match.
.....
.....
.....
Like the course? Get enrolled and start learning!