Ideally every caller would know what service they are interested in and
specify that service name. But it might be hard/annoying to configure the
client to query a specific service and most pre-existing health checking
systems aren't service-specific, but server-wide. So basically that means
that many (most?) people will just use empty string and move on with life.
For example, in k8s readiness is job-wide; if your job is providing
multiple services you can tell k8s you're ready for service A but not ready
for service B.

But occasionally you have issues where you have a single server with two
sets of semi-independent services. (Rather, the services may be related,
but they may *fail* independently.) In those cases it is nice for clients
to be able to specify in which service they are interested.

On Thu, Nov 15, 2018 at 8:38 AM <[email protected]> wrote:

> Hi thanks for answering my question. But what do you mean the "whole
> server", checking all the grpc services registered? or it's for the
> application to define what they want to check before returning by a healthy
> status?
>
> --Thanks
>
> On Tuesday, November 13, 2018 at 7:14:43 PM UTC-5, Kun Zhang wrote:
>>
>> 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
>>  * string.
>>  */
>> 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.
>>
> --
> You received this message because you are subscribed to the Google Groups "
> grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/grpc-io.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grpc-io/fd8c621f-814c-4237-8b40-7be42c455030%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/fd8c621f-814c-4237-8b40-7be42c455030%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CA%2B4M1oOA3W_UmH7Lgui9%2BQEX1BEn-xevrC%3Dxd4NMBeW%2BfUTLSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to