Hacker News new | ask | show | jobs
by jwcrux 3554 days ago
Why would I want to use this over something like Caddy?
3 comments

This is based on Echo v3, which is a ultra fast web server framework, but, again, we need to see benchmarks of Armor vs Caddy.
Echo is fast largely because it is based on Go's standard library net/http server, the same as Caddy.
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.

I was going to say, if one wants a go web server with LetsEncrypt there's also https://docs.traefik.io/ . I have heard about Caddy, but had forgotten it is also written in go. So now there's (at least) three.
Good tip! There is also HTTP/2 web servers like H20 (written in C) and ShimmerCat (Haskell). However they are more focused on the problem of fighting latency I believe
Agreed. This is just Caddy with less features.
When you put it like that, it sounds like a good reason to prefer Armor over Caddy for some use cases :-)