Sorry for the late reply. >From what I'm reading, health checking is exactly what you want. I don't understand why you don't want to use it. https://github.com/grpc/grpc/blob/master/doc/health-checking.md
About using the channel state - Just because a channel is not in the connected state, it does not necessarily mean that the server is down. On Wednesday, December 8, 2021 at 2:13:25 PM UTC-8 Viktor Khristenko wrote: > Hello, > > Setup: > Client, server using callback unary api > > question: > How do i check from a client side that server is up/down? What I'm > currently doing is to issue grpc with deadline set + wait_for_ready as > false. the return code if shows UNAVAILABLE, then server is not there, > otherwise needs a retry... > > Here it's not about health check service that could be used, but rather > about mechanisms to check either thru channel or stub (issueing rpc)? I was > also trying to query the channel state, however not quite clear what > indicates an unavailable server (using grpc_connectivity_state)... > > the use case is I have a client connected to N servers (1 channel per > server) and does some simple load balancing with priorities. this client is > actually another server .... > > any help is greatly appreciated! > thanks! > > VK > Reply all > Reply to author > Forward > > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/e2c1fbef-0105-4a66-8c54-8f0103ab832en%40googlegroups.com.