In release 1.14, it is now possible to use gPRC LB, gRPC's full featured load balancer client. This is an experimental feature that contacts a gRPC LB server to get load balancing data.
To get started, you will need to set the JVM flag "-Dio.grpc.internal.DnsNameResolverProvider.enable_grpclb=true", and include the grpc-grpclb artifact on your class path. This enables using DNS SRV records to point to gRPCLB servers when doing load balancing.
The DNS entries need to be in a specific format to be usable. For a service called "
api.service.com", It should look something like this:
gRPC will check for an SRV record with the prefix "_grpclb._tcp" on the target you provide to the channel. If present, gRPC will use the addresses of THAT domain as balancer addresses. In LB parlance,
lb.service.com is a *balancer* address, while
api.service.com is a *backend* address. Balanacer addresses must speak the gRPCLB protocol (as defined in the proto).
There will be upcoming documentation on the exact way to configure this, but this is being announced here for interested parties to try it out and answer any questions.