logoalt Hacker News

donatj • today at 6:23 PM • 2 replies • view on HN

> Using HTTP/1 (GODEBUG=http2client=0), calling this function 100 times against index.golang.org takes ~710 milliseconds on Go 1.26 on my machine. On Go 1.27, the same program takes ~150 milliseconds.

Does this mean I need to disable http2 for this to work or is that just a further proof that http2 isn't actually being used?


Replies

giovannibajo1 • today at 6:30 PM

As explained in the post, you don’t need any of this in HTTP/2, since you get the benefits of connection sharing without having to read the drain connection body by protocol design

➕ show 1 reply
80fj0348i • today at 6:29 PM

HTTP/2 works differently, you can multiplex and prioritize different data over one TCP connection with HTTP/2. But 60-70% of the web is still HTTP/1 IIRC.