sercand/kuberesolver

Randomizing of round robin order?

pselden opened this issue · 1 comments

Is there a way to get it so each client of kuberesolver connects to things in a random order? I have a situation where I have 500 clients connecting to 100 servers and it appears like there's still some big imbalances. I believe that could be fixed by randomizing the order in which this returns results when it first connects so that connections would be more evenly distributed.

Or maybe I'm misunderstanding how the internals of this work and someone could help me with a different approach?

I actually see this is implemented already in the round robin balancer: https://github.com/grpc/grpc-go/blob/master/balancer/roundrobin/roundrobin.go#L61