emissary-ingress / emissary

open source Kubernetes-native API gateway for microservices built on the Envoy Proxy
https://www.getambassador.io
Apache License 2.0
4.38k stars 688 forks source link

Support for HTTP/2 PINGs #4950

Open nitinmohan87 opened 1 year ago

nitinmohan87 commented 1 year ago

Please describe your use case / problem. Envoy supports setting HTTP/2 keepalive settings via HTTP/2 PINGs which is really helpful in detecting dead connections.

It will be useful if we can setup HTTP/2 PINGs through Ambassador Mapping to all upstream cluster which could be gRPC or HTTP (upgrades connection to HTTP/2 by default).

Describe the solution you'd like HTTP/2 keepalive PINGs supported in Ambassador Module/Mapping similar to how TCP keepalives are configured now.

Describe alternatives you've considered HTTP/2 PINGs are application-level keepalives which works at the stream level in HTTP/2 connections whereas TCP keepalives are connection-level which means it keeps the connection open even when there are no active streams.

LanceEa commented 1 year ago

@nitinmohan87 - Would upstream active health checking be any alternative solution that would help?

https://www.getambassador.io/docs/emissary/latest/howtos/active-health-checking#active-health-checking

We also have this issue open that might be relevant as well: https://github.com/emissary-ingress/emissary/issues/4663 I think getting a good design for it might also allow us to address yours too.