Agent Wranglers

Hosting and network Recommended

Serve over HTTP/2 or HTTP/3

Serve the site over HTTP/2 at least, and over HTTP/3 where the server supports it.

How to do it

Turn on HTTP/2 in the front server. nginx before 1.25.1 uses listen 443 ssl http2, and newer versions use http2 on. Add HTTP/3 with an Alt-Svc header, and open UDP port 443.

Example

server {   # nginx 1.25.1 and later
    listen 443 ssl;
    listen 443 quic reuseport;   # HTTP/3
    http2 on;
    server_name example.com;
    add_header Alt-Svc 'h3=":443"; ma=86400';
}

How to check

curl -so /dev/null -w '%{http_version}' https://example.com/ prints 2. Add --http3 to test HTTP/3.

Measured

In an earlier lab at a 100 ms round trip, moving from HTTP/1.1 to HTTP/2 took "everything loaded" from 624 to 526 ms.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/hosting-and-network/http3.