-
Notifications
You must be signed in to change notification settings - Fork 5.3k
more granular 5xx retry policy #2300
Copy link
Copy link
Closed
Labels
beginnerGood starter issues!Good starter issues!enhancementFeature requests. Not bugs or questions.Feature requests. Not bugs or questions.help wantedNeeds help!Needs help!
Description
(cross-posting from envoy-users for tracking an issue)
What do you guys think about having more granular retry policy rather than just 5xx?
The motivation behind this post is that:
- we use nginx + uwsgi at $work.
- setting 5xx as default retry policy is not safe due to possible non-idempotent requests: did data arrive on the server? did server process them?
- however, in our setup, 502 errors are common: nginx failed to talk to uwsgi for whatever reason. Retry is safe, no data hit uwsgi. Same for 503 btw.
Basically, what I'm trying to achieve is to provide safe default retry policy for my users which would be: "connect-failure" + 502 + 503.
I see that envoy's code base has:
static bool isGatewayError(uint64_t code) { return code >= 502 && code < 505; }
which made me think about having retry policy: "gateway_error". This policy would cover my needs but as a downside includes 504 which is redundant.
Alternatively, maybe explicitly enumerating HTTP response codes? retry_on=connect_failure,502,503
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
beginnerGood starter issues!Good starter issues!enhancementFeature requests. Not bugs or questions.Feature requests. Not bugs or questions.help wantedNeeds help!Needs help!