#3688·seastar

tls: number of TLS1.3 session tickets sent is hardcoded to 2

Author: mykaulCreated Sep 12, 2026Updated Sep 12, 2026

Both the GnuTLS and OpenSSL TLS backends default to sending exactly 2 TLS1.3 session tickets on the server side, with no way to configure this.

A client that opens multiple connections to the same server (e.g. one per shard, as ScyllaDB/gocql does) can benefit from receiving more tickets, so it has a spare ticket for each subsequent connection instead of doing a full handshake.

Proposal: add a way to configure the number of session tickets sent:

  • OpenSSL: SSL_CTX_set_num_tickets() maps directly.
  • GnuTLS: no context-wide knob; disable the TLS1.3 auto-send behavior and send the requested count explicitly via gnutls_session_ticket_send() after the handshake, only when TLS1.3 was actually negotiated (the call is only valid under TLS1.3).

I have an implementation and have verified it end-to-end against a 4-shard ScyllaDB TLS cluster: the server sends exactly the configured ticket count per handshake, for various configured counts. Will follow up with a PR.