QUIC (Quick UDP Internet Connections) and HTTP/3 represent the next generation of web transport protocols. QUIC operates over UDP instead of TCP, eliminating head-of-line blocking, reducing connection establishment latency, and improving performance on lossy networks. HTTP/3 is the HTTP semantics layer built on top of QUIC.
For self-hosted infrastructure, deploying a QUIC/HTTP/3 terminator enables your services to benefit from these protocol improvements. In this guide, we compare three open-source QUIC implementations: h2o (with built-in QUIC support), quiche (Cloudflare’s QUIC library), and ngtcp2 (the native QUIC library for NGINX).
What Is QUIC and HTTP/3?
QUIC was developed by Google and standardized by the IETF as RFC 9000. It combines TLS 1.3 encryption with reliable, ordered transport in a single protocol — eliminating the separate TCP handshake and TLS negotiation steps that add latency to TCP-based connections.
Key advantages over HTTP/2 over TCP:
- Faster connection establishment: 0-RTT resumption for returning clients
- No head-of-line blocking: Independent streams within a single connection
- Improved congestion control: Modern algorithms tuned for modern networks
- Connection migration: Seamless handoff between network interfaces (WiFi to cellular)
- Built-in encryption: TLS 1.3 is mandatory, no plaintext mode
h2o Server with QUIC Support
h2o is a high-performance HTTP server with native QUIC and HTTP/3 support. It is one of the few web servers that provides production-ready HTTP/3 out of the box without requiring patching or third-party modules.
Installation
Build h2o with QUIC support:
| |
QUIC Configuration
Configure h2o.conf for HTTP/3:
| |
Start h2o:
| |
h2o Docker Compose
| |
Note that QUIC requires both TCP and UDP on port 443 — the Docker Compose file exposes both.
quiche (Cloudflare’s QUIC Implementation)
quiche is Cloudflare’s implementation of QUIC and HTTP/3, written in Rust. It is designed as a library that other projects can integrate rather than a standalone server. Cloudflare uses quiche in their production edge infrastructure.
Integration Pattern
quiche is not a standalone server — it provides QUIC and HTTP/3 protocol handling that you integrate into your own application. Common integration targets include nginx (via the nginx-quic patch), HAProxy, and custom Rust applications.
Building nginx with quiche
| |
nginx HTTP/3 Configuration
| |
ngtcp2 (QUIC for NGINX)
ngtcp2 is another QUIC implementation, specifically designed for integration with NGINX. It is maintained by the NGINX community and provides a more modular approach than the Cloudflare quiche integration.
Building NGINX with ngtcp2
| |
ngtcp2 NGINX Configuration
| |
QUIC/HTTP/3 Comparison
| Feature | h2o | quiche (nginx) | ngtcp2 (nginx) |
|---|---|---|---|
| Language | C | Rust | C |
| Type | Standalone server | Library | Library |
| QUIC version | RFC 9000 | RFC 9000 | RFC 9000 |
| HTTP/3 support | Native | Via nginx-quic patch | Via nginx module |
| TLS integration | Built-in (picotls) | BoringSSL | OpenSSL 3.x |
| 0-RTT support | Yes | Yes | Yes |
| Connection migration | Yes | Yes | Yes |
| Production use | Yes (Fastly, others) | Yes (Cloudflare) | Yes (community) |
| Docker support | Official image | Custom build | Custom build |
| Configuration | YAML | nginx.conf | nginx.conf |
| Reverse proxy | Built-in | Via nginx upstream | Via nginx upstream |
Why Self-Host QUIC Terminators?
Deploying QUIC/HTTP/3 termination at the edge of your infrastructure improves latency for all downstream services. A single QUIC terminator can serve HTTP/3 traffic while proxying to backend services that only speak HTTP/1.1 or HTTP/2 — clients get the performance benefits without any application changes.
For reverse proxy setups that complement QUIC termination, see our shadowsocks vs v2ray vs hysteria proxy guide. For DNS-over-QUIC infrastructure, check our Knot Resolver vs blocky vs dnscrypt-proxy guide. And for TLS interception and monitoring, our mitmproxy vs sslsplit vs bettercap comparison covers security testing tools.
TLS Certificate Requirements
QUIC requires TLS 1.3, which means you need valid certificates. For self-hosted infrastructure, use Let’s Encrypt or a self-hosted CA:
| |
For a self-hosted CA, consider step-ca which provides an internal PKI with automatic certificate rotation.
FAQ
Do I need QUIC on all my servers?
No. Deploy QUIC termination at the edge (reverse proxy or load balancer) and let backend services communicate over HTTP/2 or HTTP/1.1. The QUIC terminator handles protocol translation, so backend services don’t need any changes.
What ports does QUIC use?
QUIC uses UDP port 443 (the same port number as HTTPS). Your server must listen on both TCP 443 (for HTTP/2 fallback) and UDP 443 (for HTTP/3). Ensure your firewall allows UDP traffic on port 443.
Is HTTP/3 backward compatible with HTTP/2?
Yes. The Alt-Svc header advertised by the server tells clients that HTTP/3 is available on UDP port 443. Clients that support HTTP/3 will use it; others fall back to HTTP/2 over TCP. The same TLS certificate works for both.
Can I use QUIC with self-signed certificates?
QUIC requires TLS 1.3, but it does not require publicly trusted certificates. Self-signed or internally-signed certificates work for self-hosted deployments. Clients will need to trust the internal CA or accept the certificate manually.
Does QUIC improve performance on local networks?
On low-latency, reliable networks (LAN), QUIC’s advantages are less noticeable than on high-latency, lossy networks (WAN, mobile). The main benefit on LAN is 0-RTT connection resumption for returning clients.
What is the Alt-Svc header and why is it needed?
The Alt-Svc (Alternative Services) header tells HTTP/1.1 and HTTP/2 clients that HTTP/3 is available on a specific port. Without this header, clients cannot discover the HTTP/3 endpoint. The format is: h3=":443"; ma=86400 (HTTP/3 on port 443, cache for 86400 seconds).