Is HTTP/3 Here Already?

Today, I wanted to check if the Gin framework has updated support for Go 1.25, and indeed there are updates in the Build process and CI dependencies section:

Main New Features

  • Experimental HTTP/3 Support: Gin now provides experimental support for HTTP/3 through quic-go! If you want to try out the next generation of web protocols, give it a shot. (#3210)

đź”§ Build Process, Dependencies, and CI Updates

  • CI/CD support for Go 1.25, with stricter code quality linters added (#4341, #4010).

Besides this, I found that Gin supports HTTP/3 through experimental features, which is quite exciting; HTTP/3 is here.

From HTTP/0.9, HTTP/1.0, HTTP/1.1, HTTP/2, we have now reached HTTP/3.

Let’s briefly discuss the core features and differences of the various versions:

  • HTTP/3: (2022)
    • Based on QUIC, abandoning TCP
    • Built-in TLS 1.3 encryption, with content transmission encrypted by default, and TLS handshake combined with QUIC connection establishment to reduce latency
    • Connection migration, maintaining connections when the client’s IP or port changes (e.g., switching from WiFi to 4G) without needing to re-handshake.
    • Isolation of requests using “streams” to solve TCP head-of-line blocking
    • Compatible with HTTP/2 semantics
  • HTTP/2: (2015)
    • Binary framing, achieving single connection multiplexing, solving HTTP head-of-line blocking (but TCP head-of-line blocking issue remains)
    • Header compression to reduce transmission volume
    • Server push to reduce the number of client requests
  • HTTP/1.1: (1999), currently the most widely used
    • Long connections are enabled by default, allowing a single TCP connection to handle multiple request-response pairs, reducing connection establishment overhead
    • Supports Host headers, thus enabling virtual hosting
    • Response bodies can be transmitted in chunks without needing to know the total length in advance, suitable for dynamic content
    • Introduced a set of cache-related headers to control caching strategies
  • HTTP/1.0: (1996), the overall structure of HTTP is complete, using short connections where a single TCP connection handles one request-response

QUIC’s Go implementation: https://github.com/quic-go/quic-go, Gin also implements HTTP/3 support based on this. I will find time to test it in the next couple of days.

Leave a Comment