envoyproxy / envoyproxy/envoy

Feature Request: be able to set Connection header in some cases

Aperta
#3,011 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement help wanted
Lingua principale
C++
Stelle
28.9k
Fork
5.6k
Merge medio
1g 22h
PR unite (30g)
430

Descrizione

*Description*:
We're using Envoy as an inbound proxy in front of many of our services. For a given service, there will be some number of hosts, each running Envoy to receive client connections. During something like a deploy, some percentage of these hosts' services will go down. We've observed that when this happens, Envoy will send back 503s to clients, but will keep the TCP connection open, and not set `Connection: close`. Consequently, the clients hold the connection open, and keep getting errors, instead of giving up and trying a different host. As some additional context, we're using Envoy for TLS termination, so there's value in having one Envoy per service host, as opposed to a single envoy somewhere routing between the backends.

In my experimentation, I was unable to set a `Connection` header, either with a `response_headers_to_add` or `envoy.lua` filter. I asked about this on the Envoy Users list and Matt Klein confirmed that it's not possible (https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/envoy-users/Gop0a7S-vN0/eqvvRCKxBgAJ).

It would help our deployment out a lot if we could signal to clients that they should stop trying to connect if there are no clusters alive. I could imagine:
- a way to have filters that set this header based on the HTTP response code
- a config to take down a listener or set headers in it based on % of healthy clusters

Simply sending back a TCP Reset could probably also solve this in our particular case.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.