I was reading the docs for load balancing and naming, and I'm trying to understand how exactly to set this (from
https://github.com/grpc/grpc/blob/master/doc/naming.md):
- A boolean indicating whether the address is a backend address (i.e., the address to use to contact the server directly) or a balancer address (for cases where external load balancing is in use).
In Java, the ResolveServerInfo class has SocketAddress and Attributes, but I don't see any special property in Attributes that sets the boolean flag mentioned above. I have exactly a DNS entry that points to a load balancer (AWS ELB), but connections seem to persist to the same host behind that ELB (not sure if this is this issue, or a separate issue of GRPC holding on the connection for a long time).
Also, I think it would be nice to have some convenience function for this instead of having to define a NameResolver to do this. Something like "ManagedChannelBuilder.forTarget(dns).useExternalLoadBalancer(true).usePlaintext(true).build())".