TLS: count handshake signatures by key type#13289
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds new TLS operational metrics so ATS operators can better understand (1) the CPU cost drivers of full TLS handshakes by counting handshake signatures by server key type, and (2) TLS connection teardown volume via a new “connections closed” counter.
Changes:
- Add counters for full-handshake asymmetric signatures split by private key type: RSA / ECDSA / other.
- Add a new
proxy.process.ssl.connections_closedcounter intended to increment once perSSL_free. - Wire the new counters into the TLS handshake completion path and SSL teardown path.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/iocore/net/TLSBasicSupport.cc |
Counts full-handshake signatures by server private key type at handshake completion. |
src/iocore/net/SSLStats.h |
Adds new metric pointers to the SSLStatsBlock. |
src/iocore/net/SSLStats.cc |
Registers the new counters with the Metrics subsystem. |
src/iocore/net/SSLNetVConnection.cc |
Increments connections_closed during SSLNetVConnection::clear() before freeing the SSL object. |
Contributor
Author
|
[approve ci freebsd] |
JosiahWI
requested changes
Jun 19, 2026
A full TLS handshake runs an asymmetric signature whose cost depends on the server key type -- RSA being far heavier than ECDSA. Count those signatures by key type to make that work visible; resumed handshakes skip the signature. Also add proxy.process.ssl.connections_closed, incremented once per SSL_free, to track TLS connection teardown volume. New counters: * proxy.process.ssl.handshake_sign_rsa / _ecdsa / _other * proxy.process.ssl.connections_closed
c7c0569 to
cf690ac
Compare
JosiahWI
approved these changes
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A full TLS handshake runs an asymmetric signature whose cost depends on the server key type -- RSA being far heavier than ECDSA. Count those signatures by key type to make that work visible; resumed handshakes skip the signature.
Also add proxy.process.ssl.connections_closed, incremented once per TLS connection teardown, to track teardown volume.
New counters: