Hacker News new | ask | show | jobs
by insertnickname 3554 days ago
Echo is fast largely because it is based on Go's standard library net/http server, the same as Caddy.
2 comments

Not 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

But Echo v3, which Armor is based on, does not support fasthttp.
Thanks, I missed that!
fasthttp 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

I 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.