This repository has been archived by the owner on Oct 25, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 130
feat: Add requests idempotency verification on the server side #400
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change will require to tune the clients, although I think the improvement worth it |
cc @ki4070ma |
mykola-mokhnach
changed the title
feat: Add requests idempotency verification on the server side
[WIP] feat: Add requests idempotency verification on the server side
Mar 28, 2020
Can you first help me understand in which scenarios we want client side retries? |
@jlipps We don't control it. Client libraries, like OkHttp (the one that java client uses), apply retries automatically. See https://square.github.io/okhttp/4.x/okhttp/okhttp3/-ok-http-client/-builder/retry-on-connection-failure/ for more details |
mykola-mokhnach
changed the title
[WIP] feat: Add requests idempotency verification on the server side
feat: Add requests idempotency verification on the server side
Mar 30, 2020
imurchie
reviewed
Mar 30, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable. I do think that all the unnecessary fat-arrow functions will make stack traces less followable.
jlipps
approved these changes
Mar 30, 2020
👍 |
3 tasks
4 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The idea behind that is to be able to properly handle client side retries.
How this is supposed to work:
X-Idempotency-Key
header to each request we'd like to make idempotent (each request must have a different value). The server itself only considers header presence in POST and PUT requests.Read https://stripe.com/docs/api/idempotent_requests for more details on this topic