4 ms·
Echo is fast largely because it is based on Go's standard library net/http server, the same as Caddy.
by insertnickname 10y ago
Echo is fast largely because it is based on Go's standard library net/http server, the same as Caddy.
- Matthias247 10y agoI haven't used any of them, but I would expect the same. There seem to be a lot of "router" or "middleware" benchmarks nowadays, but from my experience that performance difference is negligible compared to what a different protocol or IO stack implementation can do, e.g. using blocking IO vs. using async IO, buffering and write strategies, etc. If both use net/http I wouldn't expect any difference that really matters in real applications. fasthttp seems to make a difference, but as far as I can read from the documentation it isn't used in Echo v3.
- ngrilly 10y agoNot really. Echo can use net/http or fasthttp. When using net/http, there is no significant performance gain. All the performance benefit comes from replacing net/http by fasthttp. Source: https://github.com/labstack/echo/tree/v3 https://github.com/labstack/echo/tree/v3
- caleblloyd 10y agofasthttp doesn't support HTTP/2 or web sockets yet. If you don't need either, it is a fantastic library. Source: https://github.com/valyala/fasthttp/blob/master/TODO https://github.com/valyala/fasthttp/blob/master/TODO
- insertnickname 10y agoBut Echo v3, which Armor is based on, does not support fasthttp.
- ngrilly 10y agoThanks, I missed that!