how to implement Grpc health check in java/kotlin

1,691 views
Skip to first unread message

Siddhant

unread,
Aug 27, 2022, 12:03:11 PM8/27/22
to grpc.io
hi all,
i am trying to add simple health check to my grpc application, but unable to 
the documentation are lacking any good example, maybe it's very trivial and i am just not able to understand.
i followed the docs on https://cloud.google.com/blog/topics/developers-practitioners/health-checking-your-grpc-servers-gke. but i didn't understand what i need to do? 
2nd, https://github.com/grpc-ecosystem/grpc-health-probe/#using-the-grpc-health-checking-protocol here it say, "Most of the languages listed above provide helper functions that hides implementation details. This eliminates the need for you to implement the Check rpc yourself." but there's nothing like HealthGrpc predefined.
from https://github.com/grpc/grpc/blob/master/doc/health-checking.md do i need to declare this .proto file? i did and generated source files, but idk what to do now.
i can't find any example or anything. maybe i didn't search enough, idk.
it would be very helpful if someone could guide me...

thank you,
siddhant kumar 

Sanjay Pujare

unread,
Aug 27, 2022, 5:58:09 PM8/27/22
to Siddhant, grpc.io

--
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 grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/9b1a79bb-3e2d-451f-9315-b04036a79c6bn%40googlegroups.com.

Siddhant

unread,
Aug 28, 2022, 1:29:05 AM8/28/22
to grpc.io
thank you very much.
this is what i was looking for. but why there is no mention of this class in docs or anywhere?
none the less, thank you very much...
also, i was depending on `grpc-protobuf` and `grpc-protobuff` and runtime `grpc-netty-shaded`, since examples are doing the same.
it took me 10 mins to figure out it's in `grpc-services`. rn, for testing i used, `grpc-all` and it's working.
but `all` is quite heavy it seems. i will only use  `grpc-services`, if that works.
anyway, that's on my side... :)

Many thanks,
siddhant kumar

Sanjay Pujare

unread,
Aug 28, 2022, 2:31:23 PM8/28/22
to Siddhant, grpc.io
> this is what i was looking for. but why there is no mention of this class in docs or anywhere?

Good question. You may consider contributing to https://grpc.io/ (source at https://github.com/grpc/grpc.io) or at least report this as an issue with suggestions about content to be added.


Reply all
Reply to author
Forward
0 new messages