4 ms·
Why would I use nginx and go through the hassle of configuring let's encrypt and sane SSL settings when I could just use caddy? But seriously, for all "hobby"
by shawabawa3 10y ago
Why would I use nginx and go through the hassle of configuring let's encrypt and sane SSL settings when I could just use caddy?
But seriously, for all "hobby" projects I've started recently, and even some production services now, I go straight to caddy.
My config consists of a 1 line global config file:
import sites-enabled/*
And 90% of the individual services have this config:
example.com {
proxy / http://localhost:5000 {
header_upstream Host {host}
}
}
Compared to nginx it's just so much simpler and so far I haven't found myself missing a single feature. (In fact, caddy has active health checks, which nginx only supports for its extortionate enterprise fee)
- blowski 10y agoWhat's the performance like? Can you use it as a proxy server?
- shawabawa3 10y agoI 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.
- coldtea 10y ago>I think I saw a benchmark where it said caddy can handle 2000req/s Those are application level numbers (e.g. with logic and all). Caddy should be able to handle an order of magnitude more req/s than that easily.
- anc84 10y agoOne year ago Matt said 30000req/s: https://forum.caddyserver.com/t/can-i-use-caddy-for-a-high-traffic-site/108/15 https://forum.caddyserver.com/t/can-i-use-caddy-for-a-high-t...
- shawabawa3 10y agoyeah, I clearly misremembered the benchmark It was slightly slower than nginx, but not enough to impact typical applications
- StreamBright 10y ago2000 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?
- StreamBright 10y agoI am not sure why this is getting downvoted, care to explain?
- MichaelGG 10y agoMy guess: At 500Krps on a single proxy you're probably using 40GbE or higher right? So you're a fairly niche user and should have some sort of in-depth knowledge of this space. Your current setup should already some sort of horizontal scaling system in place. Just throwing out you "need" a 500Krps came across as fake boasting/clueless/whiny. I'm sure HN would love a more in-depth comment where you say how you're accomplishing things today and what you expect out of general purpose reverse proxies, etc.
- StreamBright 10y agoIf your HTTP request size is 2048 bytes and the RPS is 500000 we get 1024000000 bytes / sec that is ~ 8 Gbit/s, lets say with overhead we are hovering around 10Gbit/s. Based on the response size you can do similar calculation. As you can see in the TechEmpower benchmarks frameworks with 3M+ req/s are not uncommon. https://www.techempower.com/benchmarks/#section=data-r12&hw=ph&test=plaintext&a=2 https://www.techempower.com/benchmarks/#section=data-r12&hw=... This is on Dell R720xd dual-Xeon E5 v2 + 10 GbE. Now if I chose technology that cuts this performance 200x times I am wasting resources. I like to idea of Caddy but before we can consider using it in production I need to make sure it can keep up with the performance requirement we got.
- MichaelGG 10y agoYeah but as a proxy you need to add the request and response and you get that much full duplex. Those numbers are also with pipelining returning a tiny static response - basically as close to a TCP echo test as you can get.
- yjftsjthsd-h 10y agoIt can act as a reverse proxy, yes. I would also love to see some performance benchmarks.
- indeyets 10y agoProxy-server performance is fine. File-serving performance — not so good.
- deleted 10y ago[deleted]