This is to answer a question originally asked on
https://github.com/grpc/grpc-java/issues/4696 by chabmed:
Hi, maybe it's not a bug I just need some clarification about the health check,
https://github.com/grpc/grpc/blob/master/doc/health-checking.md, it's mentioned that the empty string should be used as the key for server's overall health status. But inside the code i'm not seeing anything special using empty string, and when querying the helthStatus check with empty string, i receive UNKNOWN_SERVICE. I want to use this rpc for the readinessProbe in kubernetes. i'm seeing in the master branch (1.17.0) the class HealthStatusManager
* The special "service name" that represent all services on a GRPC server. It is an empty
public static final String SERVICE_NAME_ALL_SERVICES = "";
But it's not used. Am I missing something here, I know it's still an experimental API, should I implement my own non grpc health check in this case?
To use health-checking service, the application should create a HealthStatusManager and register getHealthService() to the server. The application can then set the serving status on the HealthStatusManager whenever desired. Because the serving status is always associated with a service, designated by a string, we define the empty string as the special service name to indicate the "whole server". This is a convention meant to communicate the health status of a whole server between the client and the server. The SERVICE_NAME_ALL_SERVICES constant is for the application server to use to set it, and for the application client to query it through RPC.