-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clientv3: Upgrade to round robin balancer based on gRPC 1.12 balancer API #9860
Conversation
Signed-off-by: Gyuho Lee <[email protected]>
Signed-off-by: Gyuho Lee <[email protected]>
…happy-path load balancer test Author: Joe Betz <[email protected]> Date: Wed Mar 28 15:51:33 2018 -0700
Signed-off-by: Gyuho Lee <[email protected]>
Signed-off-by: Gyuho Lee <[email protected]>
Signed-off-by: Gyuho Lee <[email protected]>
Signed-off-by: Gyuho Lee <[email protected]>
…er per ClientConn
…s endpoint, not hostname
Otherwise, "grpc.Dial" blocks when "grpc.WithTimeout" dial option gets deprecated. Signed-off-by: Gyuho Lee <[email protected]>
Otherwise, grpc.DialContext would just return before connection is up. Signed-off-by: Gyuho Lee <[email protected]>
"grpc.WithTimeout" dial option is being deprecated. Signed-off-by: Gyuho Lee <[email protected]>
…ng, fix tests to block on dial when required.
…pt to deflake alarm test
…rom dial without any additional wrapping
…c client connection
Signed-off-by: Gyuho Lee <[email protected]>
Signed-off-by: Gyuho Lee <[email protected]>
… nil pointer dereference on c.Close()
Signed-off-by: Gyuho Lee <[email protected]>
We already extensively tested this branch. And benchmark against current master branch shows no regression with (slightly) better read throughputs.
ref. https://github.com/coreos/dbtester/tree/master/test-results/2018Q2-02-etcd-client-balancer Once CIs pass, it should be safe to merge. And we will keep testing after merge. The design doc will be served here https://etcd.readthedocs.io/en/latest. Thanks a lot @jpbetz! |
nice |
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
These changes were originally fixed in etcd-io#9860 commit 9304d1a Signed-off-by: Sam Batschelet <[email protected]>
These changes were originally fixed in etcd-io#9860 commit 9304d1a Signed-off-by: Sam Batschelet <[email protected]>
We noticed that different cluster nodes have different store revisions, so the same key has different create revision depending on what node you are asking. It looks like with the new load balancer, client does not stick with a connection to particular node, but shoots requests in round robin fashion. As a result it is impossible to rely on key revisions in queries. How do you suggest to deal with this problem? (server v3.3.10 + go client v3.3.18) |
It’s a major bug for revisions to differ across nodes for the same write. Please open a separate issue for it and provide as information as you can about how etcd got into the state. |
@horkhe I think you can use linear read for consistency. |
I have no idea how we got into that state but 3 out of 4 clusters that we operate turned out to be in that weird state. We have been observing some weird behaviour of our applications for awhile, that now can be explained by inconsistent revisions in Etcd. In the end we fixed all our clusters by removing follower nodes, wiping there data and re-adding them to the cluster. |
To simplify balancer failover logic, leverage gPRC's new load balancer API and ease gRPC dependency upgrades, we've rewritten the etcd clientv3 load balancer implementation. This PR merges the new load balancer development branch to master.
Design: docs/client-architecture.rst
Benchmark: https://github.com/coreos/dbtester/tree/master/test-results/2018Q2-02-etcd-client-balancer
Key changes: