Genuinely curious, are there any cases of production Go environments where routing is the bottleneck of their HTTP services? I'd think any kind of data access in the service would be the bottleneck, not routing.
This is my question as well. With the exception of some very specialized applications, I can't see why any of this would have a significant impact on the real world performance of actual services.
Extremely few. 99%+ of your bottleneck will be in template rendering or DB access. Routing is so fast as to not matter for even "large" web applications.
Basically there aren’t much reasons besides security considerations to use net/http multiplexer at all.
The baseline was profiled under STATICALL as the default net/http multiplexer does not support dynamic paths http://golang.org/pkg/net/http/#ServeMux. The benchmark is named BenchmarkHttpServeMux_StaticAll you can read the code at https://github.com/julienschmidt/go-http-routing-benchmark/b.... Frankly, net/http it not a very good http router. The results show that julienschmidt/httprouter trie based implementing outperforms net/http by 60x.
I think the tl;dr at the top of the page answers that the best:
HttpRouter is the king of performance, scoring first on ALL tests.
2nd place goes to ace if you don’t need middleware, and Gin if you do.
3rd place goes to Goji which is mature, stable and all things considered awesome.
Negroni/Gorilla Mux seems to be a good combination for me, but Jeremy Saenz is coming out with a new mux that I'm interested in trying when it's released to see how it compares to Gorilla Mux.