envoyproxy/envoy

design proposal: request manipulation between retry attempts

Open

#12.088 aperta il 14 lug 2020

Vedi su GitHub
 (3 commenti) (2 reazioni) (0 assegnatari)C++ (5373 fork)batch import
area/httpdesign proposalhelp wanted

Metriche repository

Star
 (27.997 star)
Metriche merge PR
 (Merge medio 8g) (378 PR mergiate in 30 g)

Descrizione

Over the last few months, a few of us (@alyssawilk @snowp @Augustyniak and the Envoy Mobile team) have talked about Envoy's lack of request manipulation (headers/data/trailers) between retry attempts on outgoing HTTP requests. We would like Envoy to have the same ability to modify requests that HTTP filters provide but to do so between retry attempts.

Currently, this is not possible because retries are handled within the router filter, which is a terminal filter, and thus forbids us from further modifying the HTTP request between retries.

There are many ways to bring this feature to fruition:

  1. Upstream HTTP filters: https://github.com/envoyproxy/envoy/issues/10455
  2. Extract the retry logic from the router and allow further filters in the chain to act on requests (via @goaway)
  3. Add the concept of pluggable retry closures that allow users to inject modifications to requests in between retry attempts (via @alyssawilk)

Each of them with different tradeoffs. I created this issue to start a conversation about what we, as the community, would like to see in this space. Once we all define a rough direction we can see what company can resource the work to formalize design, and kick start implementation.

Guida contributor