Live data from Hacker News

Caddy 0.10 Released

caddyserver.com

101–110 of 128 posts

Re: Caddy 0.10 Released

#101
post #86
post #82

Earlier quoted context omitted.

I asked this question yesterday. People ask if it's "production ready" but that's like asking if something is "secure" -- I don't really know what that means. Many people use Caddy in production; it's also great for local development. People use it for "real" projects. (I do.) If it is a good match for your needs, give it a try! Start small if you're nervous, but you'll probably like it.

> but that's like asking if something is "secure" no, that's asking if an enterprise grade project is fronted with Caddy. > People use it for "real" projects. (I do.) Sure, but you're not Facebook, Google or Oracle, or big brand X or Z. If you can get Coca Cola, or Nike website run on Caddy, it will change that perception.

>no, that's asking if an enterprise grade project is fronted with Caddy.

Just because you'll be the first to use something for some purpose doesn't make the tool unfit for said purpose.

The parent post's point stands: "production-ready", like "secure", is a highly relative term.

Re: Caddy 0.10 Released

#102
post #71

Caddy is a web server written entirely in Go. Features: - Easy configuration with Caddyfile - Automatic HTTPS via Let's Encrypt; Caddy obtains and manages all cryptographic assets for you - HTTP/2 enabled by default (powered by Go standard library) - Virtual hosting for hundreds of sites per server instance, including TLS SNI - Experimental QUIC support for those that like speed TLS session ticket key rotation for mo…

So is it ready for "prime time"? Should I be considering it over Nginx for side projects or real projects?

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

#103

Earlier quoted context omitted.

Caddy uses go's standard libraries for most of its web serving parts, so you know at least that the http server code is used by google, cloudflare etc. Same goes for SSL and many other parts. However most companies out there aren't Facebook, Google, Oracle, Coca Cola or Nike anyway.

Using Go standard HTTP libraries doesn't guarantee things are stable. Here's an example how a missing option (that is Go 1.8+ - which is a recent release) can lead to a DoS: https://github.com/containous/traefik/issues/1322

Stability is relative. Knowing that it uses standard Go networking libs is an indication of how stable this thing is.

Re: Caddy 0.10 Released

#104

Earlier quoted context omitted.

Using Go standard HTTP libraries doesn't guarantee things are stable. Here's an example how a missing option (that is Go 1.8+ - which is a recent release) can lead to a DoS: https://github.com/containous/traefik/issues/1322

Yeah, as it happens in software in general there aren't any guarantees. I could too give you a link to heartbleed. Caddy wasn't affected.

Well, yes, although security and stability are different matters. Every software has bugs, I just said that the fact something is using Go HTTP library doesn't automagically mean it's production quality. There are always many ways to accidentally shot oneself in the leg.

(Caddy, in my experience is production quality. I've used it in a few projects and haven't had any serious issues. Maybe that's just my use cases, though.)

Re: Caddy 0.10 Released

#105

Earlier quoted context omitted.

I use it exclusively as a proxy server. I've never noticed any performance issues, I think I saw a benchmark where it said caddy can handle 2000req/s, which is at least an order of magnitude or 2 faster than any upstream service I've used it in front of.

2000 req/s is tragic. We have services with 100 000req/s so i need a reverse proxy with at least 500 000 req/s. What is the reason of this low performance?

I am not sure why this is getting downvoted, care to explain?

Re: Caddy 0.10 Released

#106
post #71

Earlier quoted context omitted.

So is it ready for "prime time"? Should I be considering it over Nginx for side projects or real projects?

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…

Wait... why would a web server need to know about changing DNS?

Re: Caddy 0.10 Released

#107
post #71

Earlier quoted context omitted.

So is it ready for "prime time"? Should I be considering it over Nginx for side projects or real projects?

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…

> 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

#109

Random question: is there a way to start Caddy as root so it can bind to port 80 (for example) then change the user so a non-root user can send a `USR1` signal to Caddy to get it to reload the configuration?

At least with systemd caddy starts as a non-root user, if you use the provided unit-file: https://github.com/mholt/caddy/tree/master/dist/init/linux-s...

Is there something like `setcap` for macOS?

    Give the caddy binary the ability to bind to privileged ports (e.g. 80, 443) as a non-root user:

        sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/caddy

Re: Caddy 0.10 Released

#110

Earlier quoted context omitted.

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…

Wait... why would a web server need to know about changing DNS?

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.

Post reply on HN