Live data from Hacker News

Nginx Development Guide

nginx.org

11–20 of 39 posts

Re: Nginx Development Guide

#11

These days I'd rather develop on Caddy than Nginx.

Have there been any good in-depth comparisons of the two recently (from an admin/user PoV, out-of-the-box featureset & performance for common tasks). I've not seen anything recent that isn't entirely superficial (little more than “I prefer the config format”, which while valid isn't exactly in-depth or in-bredth).

Both are great technologies and I use them both. My way of thinking these days is "use Caddy until there is a reason for nginx". When I am developing a web application, I use Caddy in my dev server as a proxy for my front end server so you get hot reloading and stuff and the the backend dev server. You need to have three things up but works for me. It's nice to have a single binary!

Re: Nginx Development Guide

#13

These days I'd rather develop on Caddy than Nginx.

Caddy is cool if you want sane defaults and not bother with anything for simple hosting. As soon as you get any drop of "not the default" poured into the mix the configuration becomes quite tedious really fast. I recommend Caddy to people getting into web stuff or that need something simple even if it's a production environment at this point. But anything "tuned" ends up with Nginx.

We have a lot of larger use cases including enterprise that manage their advanced configurations quite easily. but if you have specific suggestions I'd be happy to consider them.

Re: Nginx Development Guide

#16
post #9

Earlier quoted context omitted.

Have there been any good in-depth comparisons of the two recently (from an admin/user PoV, out-of-the-box featureset & performance for common tasks). I've not seen anything recent that isn't entirely superficial (little more than “I prefer the config format”, which while valid isn't exactly in-depth or in-bredth).

https://news.ycombinator.com/item?id=32865497

Yeah. tldr:

- Both Caddy and nginx are really fast.

- Both can handle high traffic loads.

- Caddy and nginx have different failure modes. Nginx will drop requests. Caddy will hang onto them and serve them even if it takes longer.

(Note that "Caddy" is basically equivalent to "Go" -- we use its std lib HTTP implementation. It's really comparing Go and C.)

Re: Nginx Development Guide

#17
Aah nginx my first love when it comes to networking. Back in the day I played around with it so much. Such a good piece of technology and really taught me the benefits of being highly performant, low memory. There is just something elegant about it.

Re: Nginx Development Guide

#18

These days I'd rather develop on Caddy than Nginx.

I have not tried Caddy much, but Nginx and its numerous footguns are getting a little old. Nowadays I just copy and paste from my own projects. Otherwise I always have to figure which defaults are unreasonable and will bite me when I least expect it.

I got Caddy to run on my vacuum cleaner in a few minutes with no prior experience. I think that's pretty cool.

Re: Nginx Development Guide

#19

These days I'd rather develop on Caddy than Nginx.

Have there been any good in-depth comparisons of the two recently (from an admin/user PoV, out-of-the-box featureset & performance for common tasks). I've not seen anything recent that isn't entirely superficial (little more than “I prefer the config format”, which while valid isn't exactly in-depth or in-bredth).

So I've been slowly moving from nginx to Caddy in new projects (old projects still use nginx).

The reasons for this are:

1. Automatic ACME integration in Caddy compared to the mess of containers something like nginx-proxy-manager is or the unreliability of external solutions like certbot or acme.sh

2. nginx's config. Footguns like if are well known, but even just if you want to deploy a nginx server with virtual hosts, did you know that if there is no Host header nginx serves the site evaluated first in its config file (even if the site has a server_name directive)? This is fine for an enterprise deployment where you probably only have one site behind nginx anyway, but as someone who has their side projects share servers to cut down on costs, it's really undesirable. There is a way around it by setting up a default host to explicitly serve errors, but it's just a chore I don't have on Caddy.

3. I can use Caddy on the CLI for testing also, in a way that's a more advanced replacement for python -m http.server etc. for more advanced use cases, or even just setting up server config rules.

Post reply on HN