← HomeLogin
Idempotency is easy until the second request is different
~dev~opinion
blog.dochia.dev last week

Summary

The cases that matter are the ones a replay cache does not explain:

  • completed replay

  • concurrent retry

  • partial local success

  • downstream unknown state

  • same key with a different canonical command

  • duplicate operation without a key

  • retry after expiry

  • retry after deploy, schema change, service hop, or region failover

If your design only handles completed same-command retries, it is a replay cache. That might be enough for some endpoints. But it is not the whole problem.