Skip to content

Migrate to explicitly refresh name resolution by load balancer #8088

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

Open
voidzcy opened this issue Apr 15, 2021 · 0 comments
Open

Migrate to explicitly refresh name resolution by load balancer #8088

voidzcy opened this issue Apr 15, 2021 · 0 comments
Labels
experimental API Issue tracks stabilizing an experimental API
Milestone

Comments

@voidzcy
Copy link
Contributor

voidzcy commented Apr 15, 2021

Currently each subchannel implicitly refreshes the name resolution when its connection is broken. That is, this feature is built into subchannel's internal implementation. Although it eliminates the burden of having LoadBalancer implementations refresh the name resolution when connections to backends are broken, this is gives LoadBalancer no chance to disable or override this refresh.

We'd want to let LoadBalancer manage refreshes explicitly. The API has already been there for a long time: LoadBalancer.Helper.refreshNameResolution(). During the transition, SubchannelImpl will check if Helper.refreshNameResolution() is called when its connection is broken. If not, it will still refresh the resolution and log a warning. This will be removed in the future and LoadBalancers are completely responsible for triggering the refresh.

As a side effect of this check, LoadBalancers that intentionally do not want the refresh (e.g., xDS) will cause the warning. So we are adding a temporary LoadBalancer.Helper API, ignoreRefreshNameResolutionCheck() to help the transition. It's been marked as deprecated, xDS should be the only LoadBalancer implementation that uses it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental API Issue tracks stabilizing an experimental API
Projects
None yet
Development

No branches or pull requests

1 participant