I have multiple GRPC servers, all bounded to the same port using GRPC linux so_reuseport option.
This works great but for health checking I would like to iterate on all servers, one by one and identify unhealthy servers.
Because they are all have the same ip and port, I can not control to whom it will connect.
Any workarounds?
This is not possible currently, even the distribution between the port sharing servers is controlled by kernel. The load balance is kernel level. gRPC has no control over which request landing to which server.
A common way to solve this problem is opening up a side port for health checking. Or you can change to use other load balancing (see doc) technique.
PS. In gRPC health checking, you can specify health state for each service with different names.