News for hackers. Stuff that matters.
Re:Caddy 0.10 Released by drdaeman on Friday April 21, 2017 @02:13PM (#14167886)
Yes, it's pretty nice and sometimes is even nicer than nginx in some regards. E.g. it notices DNS changes without SIGHUP, so if your app is containerized, Caddy just works when you start and stop containers, when nginx requires special tricks.

However, it lacks in some areas, for example if you need some complex regex-based routing it could be somewhat unpleasant (while probably doable, the configs would look really messy).

Re:Caddy 0.10 Released by hdhzy on Friday April 21, 2017 @02:36PM (#14168102)
> Caddy just works when you start and stop containers

That doesn't sound great for zero downtime deployment but

> notices DNS changes

That sounds like it could support zero downtime (new container started, DNS records updated to this new container and then stopping old container).

Is this something like DNS SRV support in Nginx Plus? [0]

[0]: https://www.nginx.com/blog/service-discovery-nginx-plus-srv-...

Re:Caddy 0.10 Released by majewsky on Friday April 21, 2017 @02:35PM (#14168095)
Wait... why would a web server need to know about changing DNS?
Re:Caddy 0.10 Released by drdaeman on Friday April 21, 2017 @02:46PM (#14168193)
It doesn't need to know about the changes, but it surely needs to notice them as they happen.

For example, FLOSS nginx does DNS lookups just once on startup. On config (re)loads, to be exact.

E.g. when you have "proxy_pass http://spam;" or "uwsgi_pass spam:9000;", you'll end up with permanent 502 (until a SIGHUP) after you've started a new "spam" Docker container and then removed the old one.

There are well-known workarounds like "set $backend "http://spam"; proxy_pass $backend;", but it's nicer when you don't even have to think about this and know that TTLs are properly honored. Caddy does that.