Skip to content

TLS: count handshake signatures by key type#13289

Merged
moonchen merged 1 commit into
apache:masterfrom
moonchen:ssl-handshake-cpu-metrics
Jun 19, 2026
Merged

TLS: count handshake signatures by key type#13289
moonchen merged 1 commit into
apache:masterfrom
moonchen:ssl-handshake-cpu-metrics

Conversation

@moonchen

@moonchen moonchen commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

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:

  • proxy.process.ssl.handshake_sign_rsa / _ecdsa / _other
  • proxy.process.ssl.connections_closed

Copilot AI review requested due to automatic review settings June 17, 2026 03:38
@moonchen moonchen self-assigned this Jun 17, 2026
@moonchen moonchen added this to the 11.0.0 milestone Jun 17, 2026

Copilot AI 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.

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_closed counter intended to increment once per SSL_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.

Comment thread src/iocore/net/SSLNetVConnection.cc
@moonchen

Copy link
Copy Markdown
Contributor Author

[approve ci freebsd]

Comment thread src/iocore/net/TLSBasicSupport.cc Outdated
Comment thread src/iocore/net/SSLNetVConnection.cc
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
@moonchen moonchen force-pushed the ssl-handshake-cpu-metrics branch from c7c0569 to cf690ac Compare June 19, 2026 20:15
@moonchen moonchen requested a review from JosiahWI June 19, 2026 20:19
@moonchen moonchen merged commit 7766ce2 into apache:master Jun 19, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this to For v10.2.0 in ATS v10.2.x Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: For v10.2.0

Development

Successfully merging this pull request may close these issues.

3 participants