envoyproxy/envoy

Do not close health check connections when draining

Open

#20.748 geöffnet am 8. Apr. 2022

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C++ (5.373 Forks)batch import
area/health_checkinghelp wanted

Repository-Metriken

Stars
 (27.997 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8T) (378 gemergte PRs in 30 T)

Beschreibung

Description: When Envoy is draining (via /healthcheck/fail) the HttpConnectionManager will send a GOAWAY or Connection:close on both application and health check connections – even if the health check requests are setting Connection: keep-alive.

In an active health checking setup, this causes unnecessary connection churn for health check connections – clients will continue to send health check requests, but will need to open a new connection each time.

This is problematic for servers that (a) receive a lot of health checks (b) use mTLS even for health check requests.

I would expect that if the health check filter is configured, Envoy would keep these connections alive.

Repro steps:

  • Configure Envoy as below
  • Drain Envoy with healthcheck/fail
  • Send HTTP/1 health check request with Connection: keep-alive
  • Observe 503 response with Connection: close header

Config:

  • HttpConnectionManager
  • HTTP Health Check filter

If this behaviour seems reasonable to folks, would love to hear how to approach adding this to Envoy.

Contributor Guide