HttpArena
Knowledge BaseFrameworks

h2load: HTTP/2 Load Generator

h2load is part of the nghttp2 project and drives every HTTP/2 profile: baseline-h2, static-h2, baseline-h2c, json-h2c, unary-grpc, unary-grpc-tls, gateway-64 and production-stack. It supports HTTP/2 multiplexing with configurable concurrent streams per connection.

Installation

sudo apt install nghttp2-client

How it's used

For baseline-h2:

h2load https://localhost:8443/baseline2?a=1&b=1 -c 256 -m 100 -t 64 -D 5s
FlagDescriptionValue
-cNumber of connectionsper profile, e.g. 256 or 1,024
-mMax concurrent streams per connection100 for baseline and gRPC, 32 for the multi-URI profiles, 16 for production-stack reads
-tThreads64 (H2THREADS)
-DDuration5s
-iURI list file, rotated per requestmulti-URI profiles (static-h2, json-h2c, gateway-64, production-stack)
-p h2cCleartext HTTP/2 with prior knowledgebaseline-h2c, json-h2c

Why h2load?

gcannon is HTTP/1.1 only (by design - it uses raw request templates and io_uring for maximum throughput). h2load handles TLS negotiation, ALPN, HPACK header compression, and HTTP/2 stream multiplexing natively.