3 ms·
The "idempotency" is that the request should not cause a state transfer from the client to the server that causes the server to change the resource. That doesn
by rswail 4y ago
The "idempotency" is that the request should not cause a state transfer from the client to the server that causes the server to change the resource.
That doesn't mean that the server can't change the resource itself for other unrelated reasons.
- Simran-B 4y agoThe practical effect that my coworkers keep telling me about is that the client or an intermediary like a load balancer may retry the same request until it is successful, with the expectation that the resource (records or settings in a database system in our case) is only modified once. A database query that does something like value = OLD.value + 1 cannot be safely retried. There are circumstances under which the outcome of a transaction can be unknown but it might still succeed, and the client should be prevented from doing accidental changes. With read queries this should be rare, but even then there can be side-effects affecting the overall system state. There are of course solutions to this for the application side, like the usage of idempotency keys.