In the past when I wanted a really fast Go service using HTTP/2 I put the HTTP server in a C++ subprocess that handled the sockets and communicated with the Go application over a pipe. That was nice and fast, avoided the congestive collapse that Go suffers with too many runnable goroutines.
I wanted to do something fast using http3 but it ended up being way faster using ad-hoc code I wrote using http1. It would be even faster if I did it with http3 but hand writing for that protocol is a nightmare so here we are…
edit: downvoting me will not change the reality.
https://github.com/rclone/rclone/commit/ad8a108453f3ce983fb6...
It is interesting to dig into why.
There was a security vulnerability in golang.org/x/net/http2/h2c which meant govulncheck warned about it in the CI.
So I updated it and got a warning from the linter that the h2c sub package was deprecated in the latest version, so I removed it.
That is a lot of great tooling working to make things more secure in the Go ecosystem.
It does make work for maintainers though, and the Cambrian explosion of AI discovered security vulnerabilities has been particularly trying!