You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some questions about how to use this library and what are the best practices. Current README.md suggests to use this along with a client side load balancing policy. My question here is, Suppose grpc.Dial(...) has been already called and resolver respond with (let's say) 3 endpoints and therefore the returned conn from conn, err := grpc.Dial(...) with round_robin policy currently has a connection to each of these 3 endpoints. Now what happens if server scales up and increases the number of endpoints.
Am i expect to see the outgoing load also goes to new endpoints when using the old conn?
Do i need to Dial periodically or something?
What is the difference between using kuberesolver and a headless service?
What is the best practice to use this library?
I'll appreciate your time if you have any thoughts.
The text was updated successfully, but these errors were encountered:
Now what happens if the server scales up and increases the number of endpoints.
It is up to gRPC actually. kuberesolver gives IP addresses of newly created instances to gRPC and its handles rest. gRPC creates sub-connections for instances and disconnects from old ones. With gRPC retry middleware, you can retry your requests.
Am i expect to see the outgoing load also goes to new endpoints when using the old conn?
Yes
Do i need to Dial periodically or something?
No, you don't need to dial periodically. kuberesolver will provide newly created instances to gRPC and gRPC will create new subconnections.
What is the best practice to use this library?
Just register kuberesolver.RegisterInCluster() and dial with grpc.DialContext using round_robin, thats it.
What is the difference between using kuberesolver and a headless service?
headless service will give you the each IP address of pods but you need to check if they are changed. When using kuberesolver it watches service endpoint changes. Therefore when you deploy a new version of your app, gRPC automatically connects to new pods. With graceful termination policy, you will achieve zero downtime app deployments.
Hi @sercand,
I have some questions about how to use this library and what are the best practices. Current README.md suggests to use this along with a client side load balancing policy. My question here is, Suppose
grpc.Dial(...)
has been already called and resolver respond with (let's say) 3 endpoints and therefore the returnedconn
fromconn, err := grpc.Dial(...)
with round_robin policy currently has a connection to each of these 3 endpoints. Now what happens if server scales up and increases the number of endpoints.Am i expect to see the outgoing load also goes to new endpoints when using the old
conn
?Do i need to
Dial
periodically or something?What is the difference between using kuberesolver and a headless service?
What is the best practice to use this library?
I'll appreciate your time if you have any thoughts.
The text was updated successfully, but these errors were encountered: