Live data from Hacker News

Show HN: Caddy v2.5.0

github.com

31–40 of 115 posts

Re: Show HN: Caddy v2.5.0

#31
I was expecting this to be posted by mholt. :)

I use Caddy in my production systems with one exception, websockets. Yes it works, yes it is easier to configure compared to nginx. But there is this one bug that I can't really put my finger on that is hard to debug and create an issue for.

Under high load, it seems there are messages that are dropped and then the connection gets lost. It even affects the origin host because it keeps the connections alive and they keep piling up. Killing Caddy brings the upstream service back to life.

With nginx I am not having these issues and the websockets are more stable. It is just harder to set up and needs multiple moving pieces for autossl instead of it being taken care of by Caddy.

Re: Show HN: Caddy v2.5.0

#32

I utterly adore your project. Thank you so much. Are there plans for SMTP or IMAP proxying? Do you do SNI proxying too? I would love for Caddy to be my one stop shop for all TLS termination.

"Caddy L4" aka "Project Conncept" might be what you're looking for:

https://github.com/mholt/caddy-l4

"Project Conncept is an experimental layer 4 app for Caddy. It facilitates composable handling of raw TCP/UDP connections based on properties of the connection or the beginning of the stream."

Re: Show HN: Caddy v2.5.0

#33
post #11

I just used Caddy for the first time for https://lists.sh and was super impressed by the automatic TLS. The config was also 2 lines of code. Great work!

Just wanted to say this is a cool little project. I hope you get some interesting lists on there!

Re: Show HN: Caddy v2.5.0

#34
post #25
post #21

Earlier quoted context omitted.

Does it have implications for long-lived connections like SSE and websockets? It seems like restarts would have been disruptive to those but now might not be?

Possibly; the long-lived connections eventually have to end when reloads (note: restarts and reloads are different) happen, to free up resources -- otherwise they leak. (The grace period is configurable and can even be disabled.)

This bit us in a recent project where we have very long ongoing downloads, where even a very high grace period wouldn't really help.

I wonder whether it's technically generally feasible (possibly depends on net/http2's capabilities) to handover the connection from the old to the new server instance, comparable to what systemd does in terms of FD passing for socket-activated services.

Re: Show HN: Caddy v2.5.0

#35
post #33
post #11

I just used Caddy for the first time for https://lists.sh and was super impressed by the automatic TLS. The config was also 2 lines of code. Great work!

Just wanted to say this is a cool little project. I hope you get some interesting lists on there!

Hey thanks so much! I'm having a blast publishing lists and discovering what others are posting.

Re: Show HN: Caddy v2.5.0

#37
post #19

Caddy is absolutely amazing. I'm running it on an RPi that's hosting various home automation and hobby projects, all serving HTTP to the loopback interface only, with Caddy acting as a reverse proxy, and I've never even had to think about HTTPS. Adding a new service is adding a single line to my config file, and the rest happens automatically. Finally, no more "trust this self-signed certificate" even for toy project…

Would you mind sharing a (redacted if you like) copy of your config file in a Gist? Purely out of curiosity - your setup sounds really neat.

Re: Show HN: Caddy v2.5.0

#38
post #28
post #18

Caddy is such a delight! I can't reccomend it fast enough when somebody mentions they are on nginx. Small random feedback: I like the idea of JSON configuration but most of the common docs/recipes are documented only with the Caddyfile format. I couldn't figure out the full JSON schema that was expected so I wound up generating a Caddyfile string instead for my programatic control. Maybe there is some translation too…

Thanks for recommending it! I hear ya. The JSON config is definitely not trivial. I wrote our JSON docs and strove to made them easy to follow. You can traverse into the module structure piece-by-piece here: https://caddyserver.com/docs/json/ There is also a Caddy plugin by @abiosoft that can generate a JSON schema for your custom Caddy builds, which can then be used by IDEs to give you autocomplete and validation: h…

A few complete, fully working example JSON configuration files for common use cases would be really useful as well.

Re: Show HN: Caddy v2.5.0

#39
post #31

I was expecting this to be posted by mholt. :) I use Caddy in my production systems with one exception, websockets. Yes it works, yes it is easier to configure compared to nginx. But there is this one bug that I can't really put my finger on that is hard to debug and create an issue for. Under high load, it seems there are messages that are dropped and then the connection gets lost. It even affects the origin host be…

Can you open an issue with more details? I don't think this has been reported before. So that's why it hasn't been fixed yet. But we'd like to look into it.
Post reply on HN