Should retries be restricted to idempotent requests?
See original GitHub issueDetailed Description
The failsafe plugin issues retries based on the exception but completely ignores the request method, i.e. even POST
requests are retried right now.
Context
The backup request already filters for safe request methods. Maybe it’s safer to do something similar for retries?
Possible Implementation
No concrete idea yet, but there is a chance of sharing some code between backup request and failsafe plugin, since all safe methods are inherently idempotent.
Your Environment
- Version used: 2.9.0-RC.3
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (5 by maintainers)
Top Results From Across the Web
Making retries safe with idempotent APIs - Amazon AWS
Being able to simply retry requests reduces the number of edge cases that need to be dealt with by the client.
Read more >Idempotency, APIs, and Retries — Oh My! - HackerNoon
Constructing a retry mechanism for non-idempotent requests requires cooperation from the server. Namely, the client attaches a unique ID to each ...
Read more >Robust networking and safe retries with Idempotency Keys
HEAD , GET and. OPTIONS calls are idempotent by design (and any given indempotency key will be silently ignored), so this means that...
Read more >Safely repeating failed calls - Ted Kaminski
On the one hand, this gives us an idea: if the request is idempotent, we can always safely retry! Even if we've already...
Read more >Retry Requests Fearlessly with Idempotence | The Startup
OpenAccountRequest is idempotent as it is. Whenever you receive a request, you can check if an account with the same ID exists in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tkrop See #450 which outlines a proposal for 3.x tackling this in a more structured way.
You can’t unless the server responds with 429. Still you can optimize
riptide-failsafe
to not fall into this trap. As I suggested:read errors
from the default retry behavior oftransient errors
.read errors
in addition totransient errors
- only on request basis.