Live data from Hacker News

Caddy – Open-source web server with automatic HTTPS

caddyserver.com

111–120 of 132 posts

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

#111
post #83

Anyone switch from traefik to caddy and can describe why they did it?

Better documentation for Caddy 2 vs. Traefik 2 IMHO. I still don't understand half of the weird labels and incantations Traefik wants for simple container proxy scenarios. Caddy's config is just a straightforward file if you want, like nginx or apache.

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

#112
post #38
post #33

Earlier quoted context omitted.

just fyi, based on the bio of the person you're replying to, they're the author of caddy. not sure if this was known or not

Yeah, it's hard for us to hit a performance target that is being kept hidden from the devs.

I didn't mean my comment to come off as hostile. The way you replied seemed to imply you were involved in some way but didn't make note of that in your comment, sometimes when people don't realize who they're replying to they make bad assumptions, I was trying to prevent that from happening.

This whole thread has a lot of unproductive animosity, and it's possible part of that is due to the opaqueness who the identity of those involved.

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

#113
Caddy is the best. I use it as the static file server and reverse proxy for several side projects running in docker-compose.

What I like most about it is how little config you need for reasonable defaults that would require 300 lines of nginx boilerplate.

If I could wish for one thing though, I’d really like the functionality to get let’s encrypt certs while being proxied through cloudflare to be built in. Right now it requires building a custom caddy with a plug-in, which is a lot of hassle for such a vanilla setup.

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

#114
I'm not sure I understand the criticism in the top comment in this thread about Caddy's performance.

I don't think I ever really decided to use Caddy solely based on performance itself (although already fairly familiar with Go's built-in libraries for creating HTTP servers gave me confidence that it should be fairly quickly...I wasn't overly concerned about how it directly compared to Nginx/Apache/IIS/etc.).

For me, the biggest selling point was the Caddyfile format, which felt a lot more human readable than the .htaccess or Nginx configuration options I had seen over the years (I know with Caddy v2 there's the possibly now more preferred JSON option, but I'm still a sucker for the original Caddyfile format myself :-).

There's still a lot I don't know about for all of the web server options out there in general so I don't claim to be an expert in any of them, but Caddy was the first one I felt comfortable using new situations to simplify things in my environment.

For example, Caddy's reverse proxy functionality (and the way it is setup within the Caddyfile) is what finally made that particularly capability "click" for myself over 5 years ago when I first came across Caddy (even though I had seen info how Nginx + Apache were used together in the years prior, with Nginx providing reverse proxy access to Apache in those hybrid setups, it wasn't something that had "clicked" for me being aware of those situations). Since my environment is fairly simple (no real super high demand situations requiring lots of load balancing) we mainly use Caddy to provide automatic SSL capabilities and act as the publicly accessible endpoint in our environment, and use the reverse proxy functionality to tie Caddy into the various other internal servers that need that SSL termination.

I've also been able to take advantage of the built-in static file server for an internal website need and it's actually something I really think is a nice/neat feature to have available (especially due to its ability for simple server side includes, allowing for relatively easy simple templating).

Separate from that, I've also experienced first hand the personal responses that Matt Holt has provided to myself and to many others in the Caddy Community, and I'm definitely appreciative of the work he's put into Caddy (along with others of course) and I hope some of negativity in this thread is able to be easily shrugged off by Matt, because I could imagine it can be exhausting to deal with when he genuinely does care and puts a lot of thought/effort into the responses he provides.

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

#115
post #113

Caddy is the best. I use it as the static file server and reverse proxy for several side projects running in docker-compose. What I like most about it is how little config you need for reasonable defaults that would require 300 lines of nginx boilerplate. If I could wish for one thing though, I’d really like the functionality to get let’s encrypt certs while being proxied through cloudflare to be built in. Right now…

Thanks for your feedback. We try to avoid tight integration with specific, third-party providers as much as possible to keep Caddy light and flexible. Cloudflare is popular, but is also not a majority use case for Caddy users, in our experience. The Cloudflare plugin has only 16,000 downloads (and Route53 has 10,000)... out of over a million custom builds (not to mention 100M+ Docker pulls, or other ways of installing Caddy). So it's not enough of a standout to merit inclusion by default.

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

#116

Caddy is a great piece of software. We, at hatchbox.io, have to moved to Caddy (in v2) for all our applications and honestly the experience so far has been great. It’s a bliss not to deal with SSL certificate generation for our customers’ apps and let Caddy take care of it.

That's great to hear!

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

#117
post #114

I'm not sure I understand the criticism in the top comment in this thread about Caddy's performance. I don't think I ever really decided to use Caddy solely based on performance itself (although already fairly familiar with Go's built-in libraries for creating HTTP servers gave me confidence that it should be fairly quickly...I wasn't overly concerned about how it directly compared to Nginx/Apache/IIS/etc.). For me,…

Thank you for sharing your experiences. Lots of positive feedback here has helped to offset the negative, so it's only a little exhausting today. :)

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

#118
post #10
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.

That's type safety, not memory safety. ... But no, Go isn't memory safe, insofar data races can cause memory corruption.

That is a part of memory safety, not just type safety. Type safety could fix this form of memory issue, yes.

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

#119
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.

This is splitting hairs and arguing semantics. The absolutist statement "Go is memory safe" is simply incorrect.

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

#120
post #119
post #8

Earlier quoted context omitted.

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.

This is splitting hairs and arguing semantics. The absolutist statement "Go is memory safe" is simply incorrect.

> The absolutist statement "Go is memory safe" is simply incorrect.

That absolutist statement is also incorrect.

"Go has strong memory safety guarantees" is more accurate. But neither "Go is memory safe" nor "Go is not memory safe" are correct.

Post reply on HN