Live data from Hacker News

Caddy – Open-source web server with automatic HTTPS

caddyserver.com

11–20 of 132 posts

Re: Caddy – Open-source web server with automatic HTTPS

#11
I love what the Caddy project is doing, but every time I look into it I can’t get a straight answer about performance.

One of the top search results for Caddy performance is this Caddy forum thread with a response from the Caddy author: https://caddy.community/t/performance-compared-to-nginx/7993

But it seems to be dodging the question and linking to the most misleading possible Tweets instead of providing any actual info:

> Caddy is written in Go. It will perform just as well as any other Go web servers.

> Google, Netflix, Cloudflare, Fastly, and other large network companies deploy Go on their edge. You can too.

What a bizarre response.

They then link to a Tweet from someone who claims that Caddy performed 20X better than nginx. An impressive claim! But further investigation shows that virtually every other benchmark I can find shows the opposite situation: Nginx beating Caddy by up to 8X.

Performance isn’t everything and there are plenty of situations where Caddy’s ease of use might prevail, but I get nervous when project authors are giving cagey and misleading responses to straightforward (and important) questions.

Re: Caddy – Open-source web server with automatic HTTPS

#12
Good lesson here really. Nginx is an awesome, powerful tool but quite often, you don't need something that sophisticated. Also, because of it's abilities (and legacy) it's a learned skill to configure it.

Caddy just "works" (the advent of Certs that "just work" with LetsEncrypt helped enable that).

That fills a real and important use case.

Re: Caddy – Open-source web server with automatic HTTPS

#13
post #8
post #6

Earlier quoted context omitted.

Go is not memory safe, not sure where you got that idea. Go programs can absolutely succumb to nil pointer references, memory leaks, etc.

Safety can include crashing. It's better than returning subtly incorrect results. Yes, there are nil pointers and unnecessary data structures that people keep around, but that's miles ahead of C where an HTTP request and a missing bounds check can inject new code into the application. If you have a Go program where user input can be executed as code (no cgo, no unsafe), I'd love to see it.

> no cgo

If you're not careful, you will use c code when using os/user and net according to https://www.arp242.net/static-go.html.

Re: Caddy – Open-source web server with automatic HTTPS

#14

I love what the Caddy project is doing, but every time I look into it I can’t get a straight answer about performance. One of the top search results for Caddy performance is this Caddy forum thread with a response from the Caddy author: https://caddy.community/t/performance-compared-to-nginx/7993 But it seems to be dodging the question and linking to the most misleading possible Tweets instead of providing any actual…

What are your performance requirements?

Re: Caddy – Open-source web server with automatic HTTPS

#15
post #6
post #4

I love Caddy! It’s so much nicer to configure compared to Nginx. No plugins needed for automatic TLS certs – it’s bulilt-in. And it’s written in a memory-safe language – Go. Which also means a single static binary to deploy. I can warmly recommend it.

Go is not memory safe, not sure where you got that idea. Go programs can absolutely succumb to nil pointer references, memory leaks, etc.

Memory safety is a spectrum, and Go is much higher on that spectrum than C/C++.

Re: Caddy – Open-source web server with automatic HTTPS

#16
post #3

Yes, Caddy is awesome! About 3-4 years ago it made it super-easy (and possible) for me to serve my websites with `https`. Before that, I was using nginx, and the process of obtaining certificates seemed quite complicated. Matt Holt, thank you for creating Caddy.

You're welcome ^_^ Thanks for the nice comment

Re: Caddy – Open-source web server with automatic HTTPS

#17
post #14

I love what the Caddy project is doing, but every time I look into it I can’t get a straight answer about performance. One of the top search results for Caddy performance is this Caddy forum thread with a response from the Caddy author: https://caddy.community/t/performance-compared-to-nginx/7993 But it seems to be dodging the question and linking to the most misleading possible Tweets instead of providing any actual…

What are your performance requirements?

> What are your performance requirements?

If the requirements were such that web server performance didn’t matter, I wouldn’t care and wouldn’t be asking about it.

But the problem is that it doesn’t make sense to hide the performance statistics and then debate each user’s performance requirements instead of just letting the performance be a known quantity so we can all decide for ourselves.

Re: Caddy – Open-source web server with automatic HTTPS

#18

I love what the Caddy project is doing, but every time I look into it I can’t get a straight answer about performance. One of the top search results for Caddy performance is this Caddy forum thread with a response from the Caddy author: https://caddy.community/t/performance-compared-to-nginx/7993 But it seems to be dodging the question and linking to the most misleading possible Tweets instead of providing any actual…

I think the point is just that for most applications, the reverse proxy server is not a performance bottleneck, so it doesn't matter for any practical purpose. Caddy could be twice as fast or slow and it would not change the number of servers you need to deploy one way or another. If your reverse proxy is a bottleneck, you'll know and probably have the resources to build something custom instead of using Caddy or whatever.

Re: Caddy – Open-source web server with automatic HTTPS

#19
I'm an avid user of Caddy but I think the more time it passes and the more opinionated it gets, the worse it becomes overall. I don't object to highly opinionated takes but when your biggest selling point is how neat the configuration is to write it becomes more of a pain when it just isn't anymore.

Two examples from my experience upgrading from Caddy 1 to Caddy 2:

Ex.1: Caddy 1 by default bound to an arbitrary port and served via HTTP, they now default to HTTPS, which doesn't work for me since I use traefik in front of it. Bypassing this means adding a ugly ":80" in front of every single vhost I have (which is 20+), before it was just about adding "ssl" if I wanted HTTPS.

Ex.2: The reverse proxy is now transparent by default, in Caddy 1 it wasn't and you just added a "transparent" flag if you wanted it, but now you can't opt out of it and you have to manually specify every header in the config.

I don't think my use-case is that unusual (file server behind edge router) and yet I feel like I have to work against Caddy every so many steps of the way, at one point I will have to ask myself how much more work would it take to just go back to nginx instead.

Re: Caddy – Open-source web server with automatic HTTPS

#20

I love what the Caddy project is doing, but every time I look into it I can’t get a straight answer about performance. One of the top search results for Caddy performance is this Caddy forum thread with a response from the Caddy author: https://caddy.community/t/performance-compared-to-nginx/7993 But it seems to be dodging the question and linking to the most misleading possible Tweets instead of providing any actual…

I think the point is just that for most applications, the reverse proxy server is not a performance bottleneck, so it doesn't matter for any practical purpose. Caddy could be twice as fast or slow and it would not change the number of servers you need to deploy one way or another. If your reverse proxy is a bottleneck, you'll know and probably have the resources to build something custom instead of using Caddy or wha…

Yeah but this means that you could wait 8x longer with NGINX before building a custom solution.
Post reply on HN