How to test session resumption (session id and session ticket) and measure performance between them?

Ranieri Mazili ranieri85 at gmail.com
Wed Jan 31 22:06:12 UTC 2024


Hi,
I have an Nginx server where I'm trying to measure the performance
difference between not using session resumption, using session id and using
session ticket.

To do that, I just need to set this on my nginx.conf file:

#No session resumption
ssl_session_tickets off;
ssl_session_cache off;

#Session resumption - Session ID
ssl_session_tickets off;
ssl_session_cache shared:SSL:10m;

#Session resumption - Session Tickets
ssl_session_tickets on;
ssl_session_cache off;

After set each one, I can test if they are active using the following
command and check Session-ID or TLS session ticket are returned:
echo R | openssl s_client -connect mtls-as.ranieri.dev.br:443 -tls1_2
-reconnect

I also have configured the variable $ssl_session_reused to print when a
session is reused.

I've tried to test and measure the performance using the Apache Bench
software with the command below, but nginx is printing "." instead of "r"
on the logs, what means the session aren't being reused.
Apache Bench command: ab -n 500 -c 10 -k https://mtls-as.ranieri.dev.br/

Does anyone know how to test the session resumption and measure the
performance difference between them?
--
Ranieri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20240131/5f911eaa/attachment.htm>


More information about the nginx mailing list