A couple of days ago I wrote about how blazing fast the DoneCal API
can be on HTTP (1,400 requests/second) and how much slower it becomes when doing the same benchmark over HTTPS. It was, as Chris Adams pointed out, possible to run
Keep-Alive on and after some reading up it's clear that it's a good idea to switch on shared ssl_session_cache so that Nginx's SSL TCP traffic can cache some handshakes.
ssl_session_cache shared:SSL:10m :
Requests per second: 112.14 [#/sec] (mean)
Same cache size but with
-k on the
Requests per second: 906.44 [#/sec] (mean)
I'm fairly sure that most browsers with use
Keep-Alive connections so I guess it's realistic to use
-k when running
ab but since this is a test of an API it's perhaps more likely than not that clients (i.e. computer programs) don't use it. To be honest I'm not really sure but it never the less feels right to be able to use
ssl_session_cache to boost my benchmark by 40%.
It's also worth noticing that when doing a HTTP benchmark it's CPU bound on the Tornado (Python) processes (I use 4). But when doing HTTPS it's CPU bound on the Nginx itself (I use 1 worker process).