Golang web frameworks benchmark(quip.com) |
Golang web frameworks benchmark(quip.com) |
So for GITHUBALL for instance:
* BenchmarkHttpRouter_GithubAll at 66732 ns/op serves at most 15k pages/second/server, versus say
* BenchmarkGoji_GithubAll at 752515 ns/op serves at most 1.3k pages/second/server
Or for GPLUSALL
* BenchmarkHttpRouter_GPlusAll at 3258 ns/op serves at most 310k pages/second/server, versus
* BenchmarkGoji_GPlusAll at 15260 ns/op serves at most 66k pages/second/server
Would be interesting to see what the baseline is.
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'm just learning GO, that is why I'm asking.
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.https://www.dougcodes.com/go-lang/gin-gonic-may-be-40x-faste...
and here:
https://www.dougcodes.com/go-lang/martini-to-gin-back-to-mar...
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.
But I don't know why that would preclude it from these benchmarks because httprouter is not a full fledged framework either.