Grpc-java: gRPC distributed deployment (load-balancing)

Created on 11 Jan 2016  ·  1Comment  ·  Source: grpc/grpc-java

Hi, 您好。如果我在多台机器上部署多个server。 怎么让一个client side 访问多个server。并且实现负载均衡? 谢谢

Most helpful comment

Question translated: If I deploy multiple servers on multiple machines, how should a client use these servers with load-balancing?

Answer:
You will want to take a look at the NameResolver LoadBalancer interfaces. They are experimental at this point, and there aren't yet any practical implementations besides the bare-bone DnsNameResolver. However, you can create your own NameResolver and LoadBalancer, and set them via setNameResolverFactory and setLoadBalancerFactory when you build the channel.

You may also want to follow the main issue (#428)

Next time, please ask questions on our mailing list ([email protected])

>All comments

Question translated: If I deploy multiple servers on multiple machines, how should a client use these servers with load-balancing?

Answer:
You will want to take a look at the NameResolver LoadBalancer interfaces. They are experimental at this point, and there aren't yet any practical implementations besides the bare-bone DnsNameResolver. However, you can create your own NameResolver and LoadBalancer, and set them via setNameResolverFactory and setLoadBalancerFactory when you build the channel.

You may also want to follow the main issue (#428)

Next time, please ask questions on our mailing list ([email protected])

Was this page helpful?
0 / 5 - 0 ratings