Understanding HTTP/2 and HTTP/3: Why Your Self-Hosted Apps Are Faster
Modern web protocols make your self-hosted apps significantly faster. Here's how HTTP/2 and HTTP/3 work.
The Evolution of HTTP
HTTP/1.1 (1997)
One request at a time per connection. To load a page with 50 resources, the browser opens 6 connections and queues the rest.
HTTP/2 (2015)
Multiple requests simultaneously over a single connection. All 50 resources can be requested at once.
HTTP/3 (2022)
HTTP/2 over QUIC (UDP) instead of TCP. Faster connections, better performance on unreliable networks.
HTTP/2 Features
Multiplexing
Multiple streams on a single connection. No more head-of-line blocking where one slow resource blocks everything else.
Header Compression
HTTP headers (cookies, user-agent, etc.) are compressed with HPACK. Saves bandwidth, especially for APIs with many small requests.
Server Push
The server can proactively send resources it knows the client will need. Request the HTML, the server also pushes the CSS and JavaScript.
Binary Protocol
HTTP/2 is binary instead of text. More efficient to parse and less error-prone.
HTTP/3 Features
QUIC Protocol
Built on UDP instead of TCP. Connection establishment is faster (1 round trip vs 3) and handles packet loss better.
Zero Round-Trip Resumption
If you've connected before, the next connection starts instantly. No handshake needed.
Better on Mobile
HTTP/3 handles network changes (WiFi to cellular) gracefully. TCP connections break; QUIC connections persist.
Impact on Self-Hosted Apps
Switching from HTTP/1.1 to HTTP/2 typically improves page load times by 20-50%. HTTP/3 adds another 10-20% improvement, especially on mobile.
Automatic with Caddy
Caddy (TinyPod's reverse proxy) supports HTTP/2 and HTTP/3 by default. Every app you deploy automatically benefits from modern protocols. No configuration needed.