Hello!
I'm accepting bidirectional streaming gRPC connections (grpc-java, Netty) on a set of servers and are hoping to use DNS to route traffic. I'd like to be able to update a DNS record to get a client to connect to a different server as a method of load shifting. As the connections are long-lived, I'm finding that clients need to be prompted to disconnect to refresh their DNS entry and connect to the new server. I've tried several methods (returning an error response to the observer in a stream method, closing the call in the listener) but it looks like I'm able to close the channel, but never the underlying TCP connection, and so the DNS refresh never happens.
Is there a way to close a connection from the server in grpc-java? Restarting the server prompts the client to refresh, as does setting a maximum connection age, but I'd like to avoid the overhead of closing connections on a cadence.
Thanks!