Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
xdsclient: support fallback within an authority #7701
xdsclient: support fallback within an authority #7701
Changes from all commits
4909aa4
2741b76
e23a323
72930ff
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 215 in xds/internal/xdsclient/authority.go
Codecov / codecov/patch
xds/internal/xdsclient/authority.go#L214-L215
Check warning on line 230 in xds/internal/xdsclient/authority.go
Codecov / codecov/patch
xds/internal/xdsclient/authority.go#L230
Check warning on line 241 in xds/internal/xdsclient/authority.go
Codecov / codecov/patch
xds/internal/xdsclient/authority.go#L240-L241
Check warning on line 250 in xds/internal/xdsclient/authority.go
Codecov / codecov/patch
xds/internal/xdsclient/authority.go#L247-L250
Check warning on line 254 in xds/internal/xdsclient/authority.go
Codecov / codecov/patch
xds/internal/xdsclient/authority.go#L253-L254
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't quite understand this comment. If there is an error from higher priority server, we should fallback to a lower priority server. How is having an existing channel for fallback server makes any difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets say the authority has two servers: primary and fallback. We start off with primary, and say it fails and therefore we switch to fallback. And lets say the connection to fallback works and we get all resources from it and we are happy. Now, we get another error from the primary (in fact, we will keep getting stream errors from it since we retry the stream with backoff). At this point, we will see that we already have a channel to the next server in the list which is the fallback server, and therefore we have nothing to do here.
Check warning on line 266 in xds/internal/xdsclient/authority.go
Codecov / codecov/patch
xds/internal/xdsclient/authority.go#L265-L266
Check warning on line 273 in xds/internal/xdsclient/authority.go
Codecov / codecov/patch
xds/internal/xdsclient/authority.go#L272-L273
Check warning on line 278 in xds/internal/xdsclient/authority.go
Codecov / codecov/patch
xds/internal/xdsclient/authority.go#L276-L278
Check warning on line 288 in xds/internal/xdsclient/authority.go
Codecov / codecov/patch
xds/internal/xdsclient/authority.go#L287-L288
Check warning on line 531 in xds/internal/xdsclient/authority.go
Codecov / codecov/patch
xds/internal/xdsclient/authority.go#L530-L531
Check warning on line 542 in xds/internal/xdsclient/authority.go
Codecov / codecov/patch
xds/internal/xdsclient/authority.go#L539-L542
Check warning on line 574 in xds/internal/xdsclient/authority.go
Codecov / codecov/patch
xds/internal/xdsclient/authority.go#L573-L574