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
cds: Add general-purpose LB policy configuration #7744
cds: Add general-purpose LB policy configuration #7744
Changes from 11 commits
a23fd06
405f55e
b4e1249
9c53fc2
e9efa81
7ed94eb
820cc92
3eb2cbe
c2ff7a2
7a31c45
5d61da6
0adc2d4
1e2958e
593d145
c233712
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
[#not-implemented-hide:] Extensible load balancing policy configuration.
would be better here.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.
Done.
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.
One other question: should we tag this as experimental with https://github.com/envoyproxy/envoy/blob/master/tools/protodoc/protodoc.py#L55, providing freedom to do backwards compat breaking changes while you iterate on this with gRPC, or are you highly confident we're good to go with what is here as the stable version for v2 at least?
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.
I think the probability of needing changes here is fairly low, but I agree that it doesn't hurt to call it experimental for now.
Done.
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.
This seems very strange. Its almost saying here is an API way of fixing backward compatibility issues that any control plane should take care of. IOW, you are pushing what should be the control plane's responsibility in detecting the envoy version and shipping the right config down into the data plane. There is nothing wrong with that, except it has to be consistent throughout the API. Everywhere else in the API, we strive for backward compatibility, not forward compatibility. If we take the approach of reducing control plane overhead, then we should start apply it equally and not just in LB selection.
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.
As a general API principle, we want to move towards a model where the control plane has to do relatively little per-client processing, so to the extent we can specify sensible fallbacks, this works. It certainly doesn't work everywhere, but for LB policy it's sensible. I agree with your concern over consistency; directionally we want to move here and will aim to do that in future major versions.
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.
but its not that simple. Imagine control plane shipping a 2x set of listeners (set 1 with old field formats/algorithm choices, etc., set 2 with newer ones), where new ones have backwards incompatible fields. Per your (new) principle, older Envoy should ignore those erroneous listeners and only take in listeners that actually work, because this older Envoy has "forward compatibility". Now, the newer Envoy also has backwards compatibility. So, this newer Envoy will be able to process both the older set and the newer set, both of which have potentially the same settings (like binding to same addresses, or what not). So, which version is the newer envoy going to pick? Old or new or merge both ?
this is a construed scenario but you get the idea. This forward compatibility and backward compatibility has far reaching implications than just the LB. If we cannot allow forward compatibility (other than simply ignoring unknown fields), then we shouldn't be allowing it here either. If we can allow forward compatibility across the board, then we should figure out the backward compatibility issue before taking this big step. Else, this will become one of those futuristic api additions that never reaches reality, and forever confuses users as to the utility of the field.
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.
Put another way, to sovle this forward+backward compat issue, the control plane will have to know the version of the client to ship it the only latest possible configuration. At that point, the goal of this complexity introduced in the data plane API becomes moot as the primary target user (the control plane) cannot use it in reliable fashion.
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.
I don't understand the point about backwards incompatible fields. We're planning on ending completely backwards incompatible changes within a major version, see #6271, this is what we're doing in v3.
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.
@rshriram are you OK with us merging this as is for v2?