Skip to content

perf(xds): add opt-in endpoint fast path for EDS-only pushes - #10022

Closed
zhaohuabing wants to merge 9 commits into
envoyproxy:mainfrom
zhaohuabing:endpoint-fast-path-9777
Closed

zhaohuabing wants to merge 9 commits into
envoyproxy:mainfrom
zhaohuabing:endpoint-fast-path-9777

Conversation

@zhaohuabing

@zhaohuabing zhaohuabing commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Endpoint updates reach Envoy today only by riding along in a full rebuild, so how quickly they land depends on whatever a full translation happens to cost. At large scale that can be seconds, and under sustained pod churn the staleness is continuous rather than occasional.

This adds an opt-in fast path behind the EndpointFastPath runtime flag, off by default. The provider publishes EndpointSlice changes on a dedicated channel, and the xDS runner rebuilds only the affected ClusterLoadAssignments from per-cluster context captured during the last successful translation, patching them into the snapshot with only the EDS version bumped. Everything else keeps the version Envoy already has, so listeners, clusters and routes are not resent.

The full pipeline is untouched and still runs for every endpoint event, which is what keeps this safe. It remains authoritative and acts as the backstop: when the fast path cannot handle a change on its own — an endpoint count crossing zero, or a gateway using EnvoyPatchPolicy or endpoint-modifying extension hooks — it does nothing at all and lets the full path take it. Endpoint state the fast path has already published is folded into a racing build before that build goes out, so a slow build cannot regress endpoints back to what it read when it started.

Addresses #9777. The design, including the follow-up option of separating the configuration and endpoint paths in the provider, is written up here: https://docs.google.com/document/d/1r_-k6pu0eptbYucMgbilol91-0DmoekMf3MNums1luM/edit?usp=sharing

@netlify

netlify Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit 42de9ab
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6adae7908d45da99ba9339a8
😎 Deploy Preview https://deploy-preview-10022--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.28169% with 141 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.71%. Comparing base (7c22fe1) to head (42de9ab).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/provider/kubernetes/controller.go 15.51% 49 Missing ⚠️
internal/xds/runner/endpoint_fast_path.go 80.45% 26 Missing ⚠️
internal/message/types.go 10.52% 17 Missing ⚠️
internal/xds/translator/endpoint_fast_path.go 27.77% 13 Missing ⚠️
internal/gatewayapi/route.go 50.00% 12 Missing ⚠️
internal/xds/runner/runner.go 70.00% 6 Missing ⚠️
internal/gatewayapi/resource/resource.go 28.57% 5 Missing ⚠️
internal/utils/endpoints/endpoints.go 86.48% 5 Missing ⚠️
internal/xds/cache/snapshotcache.go 80.00% 5 Missing ⚠️
internal/xds/types/endpointcontext.go 81.81% 2 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10022      +/-   ##
==========================================
- Coverage   81.89%   81.71%   -0.19%     
==========================================
  Files         268      272       +4     
  Lines       42452    42761     +309     
==========================================
+ Hits        34767    34941     +174     
- Misses       7684     7819     +135     
  Partials        1        1              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zhaohuabing
zhaohuabing force-pushed the endpoint-fast-path-9777 branch 13 times, most recently from c80b052 to 8ba9c9f Compare September 17, 2026 02:32
Endpoint updates currently reach Envoy only by riding along in a full
rebuild, so their freshness is bound to whatever a full translation costs.
This adds an opt-in fast path behind the EndpointFastPath runtime flag:
the provider publishes EndpointSlice changes on a dedicated channel, and
the xDS runner rebuilds only the affected ClusterLoadAssignments from
per-cluster context captured during the last successful translation,
patching them into the snapshot with only the EDS version bumped.

Full translations still run for every endpoint event and remain
authoritative; endpoint state the fast path has published is folded into a
racing build before it is published, so a build cannot regress it. Changes
that are not load-assignment-only, such as an endpoint count crossing zero
or a gateway using EnvoyPatchPolicy or endpoint-modifying extension hooks,
are left to the full path.

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>
@zhaohuabing
zhaohuabing force-pushed the endpoint-fast-path-9777 branch from 8ba9c9f to b6e2dcd Compare September 17, 2026 02:50
zhaohuabing and others added 8 commits September 16, 2026 23:22
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>

# Conflicts:
#	internal/gatewayapi/contexts.go
Resolve conflict in internal/provider/kubernetes/controller.go: main extracted
the per-GatewayClass loop body into reconcileGatewayClass. Thread
referencedBackends into that helper so the backend collection still runs per
GatewayClass, and keep the stale EndpointUpdates pruning in Reconcile after the
loop.

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>

# Conflicts:
#	api/v1alpha1/envoygateway_types.go
@zhaohuabing

Copy link
Copy Markdown
Member Author

/retest

@zhaohuabing

Copy link
Copy Markdown
Member Author

Relpaced by #10398

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant