Fine grained control over http2 connections and streams

Hello! I need to test performance and reliability of a custom h2 implementation. k6 gets me close, but I can’t figure out how to control a couple of things:

Is it possible to send requests in parallel over the same http2 connection? I need to send two very fast requests over the same connection and ensure that the responses arrive properly, even if the actual packets are interleaved.

Second, is it possible to reuse h2 streams? I want to test long lived streams where requests may make their way to the server every 45s or so, but not teardown the stream in between.

Hello @mrkurt
I can give you a quick response on the first question.
I think batch requests may help you for that.
Take a look here

For the second question, I’m not sure I can answer, but will see if someone here can follow up :slight_smile:
Hope it helps!

Hi @mrkurt, welcome to the forum and sorry for the slow reply.

  1. As @SrPerf mentioned you can do that with http.batch
  2. k6 does this by default.

I would recommen maybe using wireshark and SSLKEYLOGGER (documentation incoming). and it doesn’t work report back