You can use channelz to get the list of clients for a server. Check out https://grpc.io/blog/a-short-introduction-to-channelz/ https://github.com/grpc/proposal/blob/master/A14-channelz.md#sockets-and-listen-sockets https://github.com/grpc/grpc-java/blob/master/services/src/main/proto/grpc/channelz/v1/channelz.proto#L428
Hope that helps. On Tuesday, November 1, 2022 at 9:47:45 AM UTC-7 kom...@gmail.com wrote: > In Cluster-Management, each node has to heartbeat with a server on > regular basis to indicate that it is alive. > When the node-A is down, server will detect that and inform other nodes > that node-A is down. > > In gRPC, clients use Channel to connect to the server and gRPC keeps the > connection alive. But how does Server get the list of clients (nodes) and > which clients are alive etc. > > I am currently using JAVA but open to any other language binding if there > is a way to implement above very easily. > > thanks, > Komal > > On Tuesday, November 1, 2022 at 9:31:30 AM UTC-7 sanjay...@google.com > wrote: > >> Which gRPC language are you using? Also I am not sure I understand the >> session concept for the cluster mgmt use-case. >> >> There is a gRFC pull request at https://github.com/grpc/proposal/pull/319 >> that proposes a cookie based session affinity but not sure if that >> addresses your question. >> >> On Tuesday, November 1, 2022 at 8:02:29 AM UTC-7 kom...@gmail.com wrote: >> >>> Hi, >>> >>> My grpc server wants to implement simple cluster management where all >>> nodes connect to my grpc server. >>> >>> If the node goes down, i want my server to let other nodes know that a >>> particular node has gone down. >>> >>> I have written bi-directional streaming api for periodic update. >>> I wanted to know is there a way to implement "session" concept for >>> cluster-mgmt usecase. >>> >>> thanks, >>> komal >>> >> -- 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/3ce9c3d2-8cf8-422b-858a-b476d4318504n%40googlegroups.com.