Skip to content

perf: store upstream client certs once per gateway - #10669

Merged
zhaohuabing merged 9 commits into
envoyproxy:mainfrom
zhaohuabing:perf/dedupe-upstream-client-certs
Nov 28, 2026
Merged

zhaohuabing merged 9 commits into
envoyproxy:mainfrom
zhaohuabing:perf/dedupe-upstream-client-certs

Conversation

@zhaohuabing

@zhaohuabing zhaohuabing commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Fixes #10069

This is the client cert half of #10069, following the same approach as #10072 for CA bundles. The EnvoyProxy backendTLS client cert is attached to every TLS destination, so each deep copy of the IR held one copy of its cert and key per destination.

-Each client cert is now stored once in the gateway IR and destinations keep a name-only reference. It's keyed by Secret name rather than a content digest, since the name is already the xDS secret name and this avoids hashing private keys.

With 1000 mTLS destinations and the CA already shared, one IR deep copy drops from 5.07 MB and 0.81 ms to 1.23 MB and 0.30 ms.

The EnvoyProxy backendTLS client certificate lands on every TLS destination, so
each deep copy of the IR copied its bytes once per destination. Store each client
cert once in the IR, keyed by its Secret name, and leave a name-only reference on
the destination, the same way envoyproxy#10072 handled CA bundles. The xDS output is unchanged.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
@netlify

netlify Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

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

Built without sensitive environment variables

Name Link
🔨 Latest commit 510759d
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6b0a9ea2752a8735d45a9412
😎 Deploy Preview https://deploy-preview-10669--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.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.43590% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.83%. Comparing base (07766e7) to head (510759d).

Files with missing lines Patch % Lines
internal/xds/translator/client_cert_registry.go 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10669      +/-   ##
==========================================
+ Coverage   82.81%   82.83%   +0.02%     
==========================================
  Files         278      279       +1     
  Lines       44658    44687      +29     
==========================================
+ Hits        36984    37018      +34     
+ Misses       7673     7668       -5     
  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 marked this pull request as ready for review November 23, 2026 01:20
@zhaohuabing
zhaohuabing requested a review from a team as a code owner November 23, 2026 01:20
@zhaohuabing
zhaohuabing requested a review from guydc November 23, 2026 01:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T09:32:36.846832Z 510759d New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@zhaohuabing
zhaohuabing requested a review from a team November 23, 2026 02:34
@zhaohuabing zhaohuabing added this to the v1.11.0-rc.1 Release milestone Nov 25, 2026
@zhaohuabing
zhaohuabing merged commit 2311fa9 into envoyproxy:main Nov 28, 2026
77 of 79 checks passed
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.

memory: CA and client certificate bytes are duplicated per destination and per IR snapshot

3 participants