Skip to content
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

ads: Envoy sending DeltaDiscoveryRequest for each EDS resource #11267

Closed
sschepens opened this issue May 19, 2020 · 10 comments · Fixed by #11300
Closed

ads: Envoy sending DeltaDiscoveryRequest for each EDS resource #11267

sschepens opened this issue May 19, 2020 · 10 comments · Fixed by #11300
Assignees
Milestone

Comments

@sschepens
Copy link
Contributor

When using CDS+EDS over ADS, when envoy receives a CDS response with new clusters it is sending a separate DeltaDiscoveryRequest for each resource instead of a single DeltaDiscoveryRequest with multiple resource_names_subscribe .

I'm using envoy 1.14.1

@sschepens
Copy link
Contributor Author

here are some logs from our controlplane:

[log_time:17:52:59.610] - [0] Got delta stream request type_url: "type.googleapis.com/envoy.config.cluster.v3.Cluster"

[log_time:17:52:59.644] - [0] Got delta stream response: system_version_info: "1589909822292_nXYGHA=="
	resources {
	  version: "1589905705182_cT_d7A=="
	  resource {
	    type_url: "type.googleapis.com/envoy.config.cluster.v3.Cluster"
	    value: "VALUE"
	  }
	  name: "cluster1"
	}
	resources {
	  version: "1589909822292_7Enb8A=="
	  resource {
	    type_url: "type.googleapis.com/envoy.config.cluster.v3.Cluster"
	    value: "VALUE"
	  }
	  name: "cluster2"
	}
	type_url: "type.googleapis.com/envoy.config.cluster.v3.Cluster"
	nonce: "2"

[log_time:17:52:59.653] - [0] Got delta stream request type_url: "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment"
	resource_names_subscribe: "cluster1"
	 
[log_time:17:52:59.654] - [0] Got delta stream request type_url: "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment"
	resource_names_subscribe: "cluster2"

[log_time:17:52:59.654] - [0] Got delta stream request type_url: "type.googleapis.com/envoy.config.cluster.v3.Cluster"
	response_nonce: "2"

@mattklein123 mattklein123 added the question Questions that are neither investigations, bugs, nor enhancements label May 21, 2020
@mattklein123
Copy link
Member

I believe this is currently by design based on how EDS works, because it is split per cluster and there really is no "delta EDS". See #10373.

@sschepens
Copy link
Contributor Author

Makes sense that it could be by current design but @htuch suggested this could be a bug.

I don't get though why LEDS would solve this and if there is no current way of fixing this.

@htuch
Copy link
Member

htuch commented May 22, 2020

It's true that there is no real delta EDS at the sub-cluster level, but I don't think there should be a separate EDS DeltaDiscoveryRequest for every cluster in a CDS update. This is the same issue in SotW that we fixed with the pause()/resume() feature.

@sschepens
Copy link
Contributor Author

@htuch i found this line which presumably is only pausing EDS on V2 api version.

We're using envoy with resource_api_version: V3 and transport_api_version: V3, i'm guessing this could be causing the issue.

Is it OK for it to be fixed to V2 resources only?

@htuch
Copy link
Member

htuch commented May 22, 2020

Yeah, I think @Shikugawa was working on something here but might not have landed (or maybe I'm misremembering). In any case, we should pause/resume both the v2 and v3 CLAs.

@sschepens
Copy link
Contributor Author

@htuch i created #11300 could you see if that does the trick? I didn't seem to find any tests regarding pausing/resuming

@mattklein123
Copy link
Member

Makes sense that it could be by current design but @htuch suggested this could be a bug.

Sorry I can't keep all of this straight, especially with ADS. So this is purely a perf enhancement, right? Meaning, it shouldn't actually matter if all of them come in different requests or for ADS is that required?

@mattklein123 mattklein123 added area/xds bug and removed question Questions that are neither investigations, bugs, nor enhancements labels May 23, 2020
@mattklein123 mattklein123 added this to the 1.15.0 milestone May 23, 2020
@htuch
Copy link
Member

htuch commented May 24, 2020

@sschepens looks like you'e on the right track, commented.

@mattklein123 yep, a performance enhancement as you describe.

@htuch
Copy link
Member

htuch commented Jun 9, 2020

Tagging for #10943

htuch pushed a commit that referenced this issue Jun 17, 2020
Pause and resune V3 Api Verions as well as V2 when using ads.

Currently only V2 Api is being paused, this causes envoy to send a separate discovery request for every resource on CDS/LDS/SRDS updates.

Risk Level: Medium?
Testing:

Fixes: #11267

Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
yashwant121 pushed a commit to yashwant121/envoy that referenced this issue Jun 24, 2020
Pause and resune V3 Api Verions as well as V2 when using ads.

Currently only V2 Api is being paused, this causes envoy to send a separate discovery request for every resource on CDS/LDS/SRDS updates.

Risk Level: Medium?
Testing:

Fixes: envoyproxy#11267

Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
Signed-off-by: yashwant121 <yadavyashwant36@gmail.com>
songhu pushed a commit to songhu/envoy that referenced this issue Jun 25, 2020
Pause and resune V3 Api Verions as well as V2 when using ads.

Currently only V2 Api is being paused, this causes envoy to send a separate discovery request for every resource on CDS/LDS/SRDS updates.

Risk Level: Medium?
Testing:

Fixes: envoyproxy#11267

Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
yashwant121 pushed a commit to yashwant121/envoy that referenced this issue Jul 24, 2020
Pause and resune V3 Api Verions as well as V2 when using ads.

Currently only V2 Api is being paused, this causes envoy to send a separate discovery request for every resource on CDS/LDS/SRDS updates.

Risk Level: Medium?
Testing:

Fixes: envoyproxy#11267

Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
Signed-off-by: yashwant121 <yadavyashwant36@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants