-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid retries when any data was written to the backend
Right now it is possible that retries happen, even when the backend received the request already. An example scenario: - the timeout ResponseHeaderTimeout is configured to be 3 seconds - a request is issued against the backend and the backend starts processing it the backend takes overall 5 seconds to process the reuqest - due to the timeout, go will abort the requests after 3 seconds and return a network error - Traefik would have retried that request as it is only checking for net errors so far To avoid this, the approch is to use httptrace to disable retries as soon as there was anything written to the backend. Websocket requests can't be retried at this point in time. This is due to the fact that gorilla/websocket doesn't use the request context and so we don't get httptrace information. Websocket clients should however retry on their own anyway.
- Loading branch information
Showing
5 changed files
with
159 additions
and
248 deletions.
There are no files selected for viewing
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 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
Oops, something went wrong.