envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.95k stars 4.8k forks source link

Add gRPC health check service support to HC filter #2898

Open futangw opened 6 years ago

futangw commented 6 years ago

Hi, I'd like to setup the gRPC health check between two envoys, but looks envoy as a server (upstream) does not generate gRPC health check response?

I had client envoy setting this: health_checks: [{
timeout: 0.5s,
interval: 5s,
unhealthy_threshold: 2,
healthy_threshold: 3,
grpc_health_check: { service_name: "ic" }
}]

and I had the server envoy setting this: http_filters:

But looks the server envoy recognizes 'this is a health check' because the statistics "http.ingress_http.tracing.health_check" is creasing, but on the client envoy, the cluster.grpc.health_check.failure is creasing too.

The tcpdump of client envoy health check request as below:

image

The tcpdump of server envoy health check response as below:

grpc_health_check_resonse

when I set "pass_through_mode: true", I did see the HC message pass to my application.

the envoy version is: envoy version: 5a49ba651b283ace69ff809fe48243ba687375d3/1.6.0-dev/Clean/RELEASE

thank you!

mattklein123 commented 6 years ago

That's correct that right now Envoy itself does not support the gRPC health check service for responding to health checks. I'm going to go ahead and mark this as a feature request.

futangw commented 6 years ago

@mattklein123 Matt, thanks for the clarification and willing to take enhancement.