Do i need to create my own loadbalancer or can i use the RoundRobin > NettyChannelBuilder.forTarget(rpcTarget) > .loadBalancerFactory(RoundRobinLoadBalancerFactory.getInstance()) > .nameResolverFactory(DnsNameResolverProvider.asFactory()) > .negotiationType(NegotiationType.valueOf(rpcNegotiationType)) > .build(); > > or do i need to use .loadBalancerFactory(GrpclbLoadBalancerFactory. getInstance())
Also the proto defined in grpclb is this meant to be served up by the loadbalancer (i.e: HAProxy) ? Which means i have to expose a grpc endpoint on HAProxy to reply with stats? On Tuesday, July 31, 2018 at 2:30:41 PM UTC-4, Carl Mastrangelo wrote: > > 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: > > A api.service.com - 127.0.0.1 > AAAA api.service.com - ::1 > SRV _grpclb._tcp.api.service.com - lb.service.com > A lb.service.com - 192.168.0.1 > > > 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. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/526f4711-bf24-467e-b0a2-253df1c8e8d9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
