Retry logic vs redirect logic

70 views
Skip to first unread message

Allen Tracht

unread,
Mar 15, 2021, 1:57:35 PM3/15/21
to envoy-users
As I understand it, Envoy can, in general, retry requests that get, for example, a 5xx response but, if they get a 3xx redirect response, they can only resend the request to the new target if the request has no body.

This seems asymmetric: If redirect can't replay the body to the new target, how does retry do that?  Conversely, if retry can replay the body, why can't redirect?

Finally, if either can replay the body, are there limits on the size of the body?

Best,
Allen

References:

Matt Klein

unread,
Mar 24, 2021, 6:47:09 PM3/24/21
to Allen Tracht, Alyssa Wilk, envoy-users
cc @Alyssa Wilk who might know offhand. I don't recall whether we allow body redirection during internal redirection and would need to look at the code.

--
You received this message because you are subscribed to the Google Groups "envoy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to envoy-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/envoy-users/a7fd48a7-6a87-4e12-b038-d541e2e5d24cn%40googlegroups.com.

Derek Argueta

unread,
Mar 25, 2021, 4:26:36 PM3/25/21
to Matt Klein, Allen Tracht, Alyssa Wilk, envoy-users
I'm currently working on being able to do internal redirects with request bodies here: https://github.com/envoyproxy/envoy/pull/15634 and to your point it will re-use the same buffering logic as retries, but there are some differences in the implementations since the current design of internal redirects re-runs the request through routing to select a new route (requiring the creation of a new stream since you're talking to a new cluster), whereas retries just need to dispatch the request against the same destination.

The exclusion of bodies from internal redirects was just a convenience for the initial implementation but not a hard constraint, just wasn't getting implemented until now.

As for "are there limits on the size of the body?", this is configured by per_request_buffer_limit_bytes.



--
Derek Argueta
Reply all
Reply to author
Forward
0 new messages