I have a headless service running with multiple replicas. When trying to verify client-side load balancing using round robin I see that all requests end up in the same replica. Client setup looks like following:
conn, err := grpc.Dial(
address,
grpc.WithInsecure(),
grpc.WithDefaultServiceConfig(`{"loadBalancingPolicy":"round_robin"}`),)
I've verified multiple endpoints in service. I also verified that service resolves to these multiple IP, but somehow it does connect only to the first pod in that list.
MAX_CONNECTION_AGE
is set to 30s on the server side to ensure client re-connects occasionally in case there has been a scale-up.
I've followed numerous articles on how to set this up and it just does not work. What am I missing?