Skip to content
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: Replace balancer with upstream grpc solution #12671

Merged
merged 1 commit into from
Feb 17, 2021

Conversation

ptabor
Copy link
Contributor

@ptabor ptabor commented Feb 7, 2021

Replace custom balancer logic in clientv3 with grpc infrastructure:

  • custom resolver + round_robin load balancer.

This commit significantly reduces volume of custom code
in etcd client v3, while preserving full existing functionality.

…_robin LB

This commit significantly reduces volume of custom code
in etcd client v3, while preserving full existing functionality.
@ptabor
Copy link
Contributor Author

ptabor commented Feb 11, 2021

@jpbetz @jingyih @gyuho - this is pretty substantial change. Please let me know if I have not missed any 'special' important properties of the (previous) balancer implementation.

@jpbetz
Copy link
Contributor

jpbetz commented Feb 16, 2021

LGTM

@jpbetz
Copy link
Contributor

jpbetz commented Feb 16, 2021

@jingyih any thoughts?

@ptabor ptabor merged commit b67ed4e into etcd-io:master Feb 17, 2021
@ptabor ptabor deleted the 20210207-grpc-del-balancer branch February 17, 2021 21:45
if creds != nil {
opts = append(opts, grpc.WithTransportCredentials(creds))
} else {
opts = append(opts, grpc.WithInsecure())
}
opts = append(opts, grpc.WithContextDialer(dialer))
grpc.WithDisableRetry()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a comment on this? So, now gRPC enables retry by default?

Copy link

@jqmichael jqmichael Mar 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, now gRPC enables retry by default?

I don't think so.

	// Retry is set if retry is explicitly enabled via "GRPC_GO_RETRY=on".
	Retry = strings.EqualFold(os.Getenv(retryStr), "on")

https://github.com/grpc/grpc-go/blame/61f0b5fa7c1c375e2bbf29f2f5f8610d2b5ba956/internal/envconfig/envconfig.go#L34

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this in follow up PR:

4a1c245#diff-2bbaa3c83234888775aabf7697076e8035451045c479938e03ebb5c929132679L209

In general we should replace clientv3 retry interceptors with RetryPolicy.

Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clean migration!

Can we please add more comments and address other comments here?

ptabor added a commit to ptabor/etcd that referenced this pull request Feb 21, 2021
ptabor added a commit to ptabor/etcd that referenced this pull request Feb 22, 2021
ptabor added a commit to ptabor/etcd that referenced this pull request Feb 22, 2021
ptabor added a commit to ptabor/etcd that referenced this pull request Feb 22, 2021
ptabor added a commit to ptabor/etcd that referenced this pull request Feb 22, 2021
ptabor added a commit to ptabor/etcd that referenced this pull request Feb 22, 2021
ptabor added a commit to ptabor/etcd that referenced this pull request Feb 23, 2021
ptabor added a commit to ptabor/etcd that referenced this pull request Feb 23, 2021
@gyuho
Copy link
Contributor

gyuho commented Mar 6, 2021

@jqmichael

@ahrtr ahrtr mentioned this pull request Oct 13, 2023
24 tasks
chaochn47 added a commit to chaochn47/etcd that referenced this pull request Oct 26, 2023
… grpc solution

Signed-off-by: Chao Chen <chaochn@amazon.com>
chaochn47 added a commit to chaochn47/etcd that referenced this pull request Oct 27, 2023
… grpc solution

Signed-off-by: Chao Chen <chaochn@amazon.com>
chaochn47 added a commit to chaochn47/etcd that referenced this pull request Oct 27, 2023
… grpc solution

Signed-off-by: Chao Chen <chaochn@amazon.com>
chaochn47 added a commit to chaochn47/etcd that referenced this pull request Oct 30, 2023
… grpc solution

Signed-off-by: Chao Chen <chaochn@amazon.com>
ahrtr added a commit that referenced this pull request Oct 31, 2023
[3.4] Backport #12671 clientv3: Replace balancer with upstream grpc solution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants