logoalt Hacker News

jeffbeetoday at 1:10 AM0 repliesview on HN

It has a bit, but there are fundamental issues. Given the way the Go runtime wants to deal with reading and writing sockets, HTTP/2 requires 2 extra goroutines per connection, and the bouncing around over channels that this implies. This might not be a law of physics but there isn't another obvious way to do it in Go.

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.