question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should retries be restricted to idempotent requests?

See original GitHub issue

Detailed 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:closed
  • Created 5 years ago
  • Comments:17 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
whiskeysierracommented, Jul 16, 2018

@tkrop See #450 which outlines a proposal for 3.x tackling this in a more structured way.

0reactions
tkropcommented, Jul 16, 2018

You can’t unless the server responds with 429. Still you can optimize riptide-failsafe to not fall into this trap. As I suggested:

  1. Remove all read errors from the default retry behavior of transient errors.
  2. Add a feature that explicitly allows clients to enable retry on read errors in addition to transient errors - only on request basis.
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found