I was under the impression that the underlying net/http library uses a new goroutine for every connection, so each websocket gets its own goroutine. Or is there somewhere else you were expecting goroutines in addition to the one per connection?
What you would do in go is:
- either a new goroutine per message
- or installing a worker pool with a predefined goroutine size accepting messages for processing