TLS session resumption


I’m trying to do a load test with client using https. To be closer to real clients I’d like to see what is the impact of having tls session resumption used. However, I don’t see any way to configure that with k6 : noConnectionReuse and noVUConnectionReuse seems to only create completely new sessions with a full handshake.


Hi @duarnad,

I needed to read up on it somewhat, but unfortunately don’t have time to completely understand everything.

The tl;dr is that this is not supported(at least not in full), because:

  1. we need to change the http/tls code in k6 to cache the session ticket … which we apparently don’t, but I managed to get something working with 1 line … it just will probably require more for an actual PR.
  2. golang (the language that k6 is written in) apparently doesn’t support session ID resumption

And because we are still pushing PR 1007 out, I propose you make an issue to implement this in the future :slight_smile:.

Thank you ! Ok. In the mean time I have also looked at the go level and I was surprised they don’t support session ids. At least for tls 1.2 session tickets are often disabled server side for security reasons. I’ll create an issue as you suggest : this would help to have a more realistic load as no keep alive without session resumptions quickly kills the performance.
I had not seen this PR and this is really promising !