Skip to content

tls: share the builtin stat name set across all TLS contexts - #46469

Open
briansonnenberg wants to merge 1 commit into
envoyproxy:mainfrom
briansonnenberg:brian_opts
Open

tls: share the builtin stat name set across all TLS contexts#46469
briansonnenberg wants to merge 1 commit into
envoyproxy:mainfrom
briansonnenberg:brian_opts

Conversation

@briansonnenberg

@briansonnenberg briansonnenberg commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Each ContextImpl previously allocated a separate StatNameSet for BoringSSL ciphers, curves, signature algorithms, and versions. Since these built-in names are constant across contexts, creating them per context duplicated symbol table encodes and memory overhead during SDS rotations.

Move built-in TLS stat names into a single object managed via the server singleton manager. Each ContextImpl holds a shared_ptr to the singleton instance.

TAG=agy

Additional Description: N/A
Risk Level: low
Testing: Existing test suites validate these stats.
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Comment thread source/common/tls/context_impl.cc

@kyessenov kyessenov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM to me. Please fix the CI and dial-down the AI description tone :) I'll assign to @ggreenway since this is core code, and we need a second set of eyes.

@briansonnenberg

Copy link
Copy Markdown
Contributor Author

/retest

@briansonnenberg
briansonnenberg force-pushed the brian_opts branch 2 times, most recently from 16404a7 to 85f9698 Compare August 3, 2026 20:44
Each ContextImpl previously allocated a separate StatNameSet for BoringSSL
ciphers, curves, signature algorithms, and versions. Since these built-in names
are constant across contexts, creating them per context duplicated symbol table
encodes and memory overhead during SDS rotations.

Move built-in TLS stat names into a single object managed via the server singleton
manager. Each ContextImpl holds a shared_ptr to the singleton instance.

TAG=agy

Signed-off-by: Brian Sonnenberg <bsonnenberg@google.com>
@briansonnenberg

Copy link
Copy Markdown
Contributor Author

@ggreenway Could you take a look?

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.

3 participants