Is it a good idea to use stream RPC for health check?

109 views
Skip to first unread message

ran...@addepar.com

unread,
Oct 14, 2016, 8:15:38 PM10/14/16
to grpc.io
I think it is feasible to use a long-lived stream RPC for sending health status updates.
Clients should have more up-to-date service health status with this approach compare to periodically pinging server.

Is there any caveats with this approach??

stephen....@gmail.com

unread,
Oct 14, 2016, 9:32:20 PM10/14/16
to grpc.io
Ironically, I have a grpc-java project that uses a long-lived, two-way stream, but I had to add manual, ping-based health checks to detect disconnections.

I am anticipating/assuming eventually grpc will handle this, but for me neither the server or client side would notice when the connection went down.

(This definitely happened when the stream was passive/not-being-used, but I'm ~50% sure it also happened when messages were actively being sent, and neither the client nor server would immediately recognize the connection was actually down.)

- Stephen
Reply all
Reply to author
Forward
0 new messages