Hi, 您好。如果我在多台机器上部署多个server。 怎么让一个client side 访问多个server。并且实现负载均衡? 谢谢
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])
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
NameResolverLoadBalancerinterfaces. They are experimental at this point, and there aren't yet any practical implementations besides the bare-boneDnsNameResolver. However, you can create your ownNameResolverandLoadBalancer, and set them viasetNameResolverFactoryandsetLoadBalancerFactorywhen 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])