K6 HTTP/3 QUIC support?

I’ve been revisiting Nginx HTTP/3 over QUIC/UDP and was wondering what are k6’s plans for HTTP3/QUIC ? Previously for HTTP/3 load testing I built a HTTP/3 supported version of h2load. But would be nice if k6 had support too :smiley:

nginx -V
nginx version: nginx/1.23.2 (011122-105436-centos7-d9e494b-br-6e975bc)
built by gcc 11.2.1 20220127 (Red Hat 11.2.1-9) (GCC)
built with OpenSSL 1.1.1q+quic 5 Jul 2022
curl -Ikv --http3 https://domain1.com/
*   Trying 111.222.333.444:443...
* Connect socket 5 over QUIC to 111.222.333.444:443
* Skipped certificate verification
* Connected to domain1.com (111.222.333.444) port 443 (#0)
* h2h3 [:method: HEAD]
* h2h3 [:path: /]
* h2h3 [:scheme: https]
* h2h3 [:authority: domain1.com]
* h2h3 [user-agent: curl/7.85.0]
* h2h3 [accept: */*]
* Using HTTP/3 Stream ID: 0 (easy handle 0xa80c30)
> Host: domain1.com
> user-agent: curl/7.85.0
> accept: */*
* ngh3_stream_recv returns 0 bytes and EAGAIN
< HTTP/3 200
HTTP/3 200
< date: Tue, 01 Nov 2022 11:27:01 GMT
date: Tue, 01 Nov 2022 11:27:01 GMT
< content-type: text/html; charset=utf-8
content-type: text/html; charset=utf-8
< content-length: 2
content-length: 2
< last-modified: Sun, 16 Oct 2022 02:09:43 GMT
last-modified: Sun, 16 Oct 2022 02:09:43 GMT
< vary: Accept-Encoding
vary: Accept-Encoding
< etag: "634b67e7-2"
etag: "634b67e7-2"
< server: nginx centminmod
server: nginx centminmod
< x-powered-by: centminmod
x-powered-by: centminmod
< x-cache-status: MISS
x-cache-status: MISS
< accept-ranges: bytes
accept-ranges: bytes

* Connection #0 to host domain1.com left intact

We’d like to support it too (see Support for QUIC protocol · Issue #238 · grafana/k6 · GitHub), though there were some difficulties the last time we looked into the issue.

k6 not only has to make HTTP requests, it also has to measure them correctly, and IIRC, GitHub - quic-go/quic-go: A QUIC implementation in pure go didn’t support httptrace package - net/http/httptrace - Go Packages (or had some other way of tracing and measuring HTTP requests).

It would be way easier if the Go standard library supported HTTP/3 (net/http: support HTTP/3 · Issue #32204 · golang/go · GitHub) first and we used that directly, though we might have problems similar to Any way to force to use HTTP/1.1 protocol · Issue #936 · grafana/k6 · GitHub even with that approach :disappointed:

So yeah, the TLDR version is that we’d very much like to support QUIC / HTTP3, it’s just not very simple to implement right now and might force us to make some sacrifices and breaking changes. Follow the issues I linked to for updates.

1 Like

Cheers @ned indeed difficult to implement! Will follow the links :slight_smile:

@eva2000 - In your post, you mentioned “I built a HTTP/3 supported version of h2load”. Could you please elucidate the process you followed to achieve this or direct me to a source I can reference to create one myself?

Maybe this extension helps you until http3 is officially supported by k6.

1 Like