OpenSSL session cache concurrency behavior with session IDs and tickets
0 reputation · 24 Dec 2023, 01:34 UTC
0 reputation · 24 Dec 2023, 01:34 UTC
OpenSSL provides TLS session resumption via server-side session cache and via Session Tickets per RFC 5077. The documented capability aims to reduce handshake latency for returning clients by reusing session state. Under concurrent connection loads, the behavior of the session cache becomes relevant for performance design.
Server-side caching stores session state in memory for rapid lookup, while session tickets move state to the client and remove server lookups. The documented limits for cache size, locking, and eviction under high concurrency are not clearly specified, and implementation-specific variance is noted for eviction policies.
What limits are documented for the default in-memory session cache under concurrent TLS handshakes? Is session cache locking documented as affecting handshake latency under concurrent requests? Is the eviction policy for session IDs configurable and documented compared with session tickets?
The default SSL_SESSION in‑memory cache has no publicly documented maximum capacity; it grows with available memory and internal hash‑table mechanics. Under high parallel handshake loads, the cache is protected by internal mutexes, and lock contention can add measurable latency to each handshake, especially on multi‑core servers.
SSL_CTX or any public API.openssl version -a to confirm the exact OpenSSL release and platform.CRYPTO_set_id_callback and CRYPTO_set_lock_callback hooks (or strace/ltrace) to observe lock acquisition during handshakes.openssl s_client across parallel processes, comparing runs with and without ticket usage (‑ticket flag or SSL_SESSION_set_ticket).To tailor further recommendations, please specify the OpenSSL version and whether session tickets are enabled in your deployment.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.