-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Clarify that on-demand CDS does not support SotW xDS #24763
Clarify that on-demand CDS does not support SotW xDS #24763
Conversation
Signed-off-by: Jacek Ewertowski <[email protected]>
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
A quick drive-by comment: I can't think of any reason in principle that on-demand CDS wouldn't work with SotW. This is very similar to how gRPC uses CDS at the protocol level (although in gRPC, the fetch of a CDS resource is triggered by the presence of the cluster name in the RouteConfig, not by receiving a request that actually needs to be sent to that cluster). |
Looking at the discussion of the original issue #15523, and quoting from the doc:
so this seems intentional. I wonder if this is a misbehavior of the specific management service that was used. |
@adisuissa I think that conversation assumes that Envoy will always use a wildcard subscription for CDS. In principle, there's no reason that Envoy can't request individual CDS resources in addition to the wildcard subscription. I would expect it to do exactly that when on-demand CDS is used, as per discussion in #16861 and #16855. It may be that Envoy does not yet support this mechanism for SotW, but there's no protocol-level reason that it can't do so. |
@adisuissa thank you for linking that document. Now I understand the wider context.
I was thinking about this and in my opinion SotW could also be supported and there's no protocol-level reason that it can't do so, as @markdroth said. Even if a control plane will not to "tailor" the SotW pushes that remove previously requested clusters, then on-demand CDS will load those clusters again on the next request. My use case is to prevent loading new routes by the listener manager when ClusterLoadAssignments were not received and clusters were not warmed. In such a case, a listener returns 503, because it routes request to a non-existing cluster that in fact exists, but is not ready to serve traffic, because of warming. |
I agree that Envoy essentially supports CDS as wildcard/collection subscription, and that is why SotW isn't supported (although generally speaking, it shouldn't be a problem).
IIUC this is because there's no warming between RDS and CDS. Technically speaking, a control-plane can send an RDS update with a route to non-existent cluster (or that will be added in a future CDS response), and that route will also return 503s. |
Yes, you understand it correctly.
You're right. I was considering this approach, but it has the following downsides when we consider SotW stream:
|
In general, I don't think it's a good idea for control planes to do things like that, because this is a layering violation: the transport protocol layer should just treat the resources as opaque blobs and should not need to know anything about their contents or their relationships to each other. (Note that this is essentially the same argument I made against the control plane being required to re-send the EDS resource when the CDS resource changes in #13009.) |
I think the ideal solution to @jewertow's use case would be for Envoy to have the ability to fetch only a specific set of individual cluster names (determined from processing the RouteConfig) rather than making a wildcard CDS subscription. This is basically what gRPC does today, and I think it would effectively involve warming between RDS and CDS. But if that is too complicated for Envoy to implement, then I think on-demand CDS would also be a fine approach. And I do not believe that there is any conceptual reason that this won't work with the xDS transport protocol. Ultimately, I think this comes down to a question of which approach is easier to implement in Envoy. |
Thank you very much for feedback, but after analyzing this feature in more detail, I decided to not working on this for now. |
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.
Thanks, left a minor suggestion.
FWIW, I think that it is possible that ODCDS will use SotW, it just needs to handle a few corner cases. |
Co-authored-by: Adi (Suissa) Peleg <[email protected]> Signed-off-by: Jacek Ewertowski <[email protected]>
Sure, thanks. I wanted to add this warning to just save someone's time when trying to use this feature with Istio. |
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.
LGTM, thanks!
/retest |
Retrying Azure Pipelines: |
* Clarify that on-demand CDS does not support SotW xDS Signed-off-by: Jacek Ewertowski <[email protected]> Signed-off-by: VishalDamgude <[email protected]>
Signed-off-by: Jacek Ewertowski [email protected]
Commit Message: Clarify that on-demand CDS does not support SotW xDS
Additional Description:
Risk Level: n/a
Testing: n/a
Docs Changes: It's a doc change.
Release Notes: n/a
Platform Specific Features: n/a
I was trying to configure on-demand CDS in an Istio ingress-gateway, but the process failed with the following error:
I had to dive into the code base to figure out why it fails and I found this method:
so I think it's worth to mention about this limitation in the docs.
Could I also add more details to that panic message or is it intentionally so general? I noticed that most panic messages are very general, so I wonder if this is a convention...?
Question:
Btw. is it an intended limitation or could it be implemented? I'm considering on-demand CDS as a workaround for the problem described in #18958, so if there are no obstacles to make it work with SotW ADS, I would be interested in implementing this feature.