I saw that envoy added delta cds support in the latest release version. the official docs showed that envoy client could start a spontaneous DeltaDiscoveryRequests to the discovery service.
(delta xds) Allows the Envoy to on-demand / lazily request additional resources. For example, requesting a cluster only when a request for that cluster arrives.
we developed an extension for our middleware in our team, but we did not intent to allocate all cds resources, because the price ( the large size of "state-of-the-world" resources ) was too heavy to afford. so we wanted to start a spontaneous DeltaDiscoveryRequests when the envoy proxy was running (not at the start of envoy).
I queried the source code of envoy, and I did not find the appropriate api to call in our extension. what should I do to solve this problem ?
What you are asking for is what we are calling "on demand" vs. "basic delta xDS."
I'm not sure of the current status of "on demand." AFAIK OSS development hasn't started for anything other than VHDS. cc @htuch @wgallagher @fredlas
Adding @dmitri-d, the author of the VHDS work.
We have most of the hooks in place for on-demand CDS, as we have built this internally at Google. https://github.com/envoyproxy/envoy/blob/5db71247a952964da1c405b2855361ba9d41a7d2/source/common/upstream/cluster_manager_impl.h#L235 is key to this. But, it would be awesome if someone implements the on-demand CDS in xDS as specified. When VHD settles, that should have already thrashed out some of the issues you're likely to hit.
We have most of the hooks in place for on-demand CDS, as we have built this internally at Google.
is key to this. But, it would be awesome if someone implements the on-demand CDS in xDS as specified. When VHD settles, that should have already thrashed out some of the issues you're likely to hit.
Thanks. your answer clear up my confusion to some extent.
if I expose updateResourceInterest in class ClusterManager through cds_api_:
in cds_api_impl.h, I added:
void updateClusterInterest(const std::set<std::string>& update_to_these_names) override {
subscription_->updateResourceInterest(update_to_these_names);
}
and I set api_type in ADS to DELTA_GRPC, then I can call updateClusterInterest to notify GRPC server to transfer the cluster resource I need, is this an appropriate approach ? @fredlas @htuch
I think this is the right direction, but you probably don't want to expose the ability to change the full resource set; instead, you want to have an additive method, i.e. addClusterToInterest
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.