3 ms·
If you tell nginx to limit itself to 4 workers x 1024 connections per worker = 4096 connections, and hurl 10k connections at it, of course it's going to throw e
by kijin 4y ago
If you tell nginx to limit itself to 4 workers x 1024 connections per worker = 4096 connections, and hurl 10k connections at it, of course it's going to throw errors. It's doing exactly what you told it to do.
That's just one example of how OP's "optimized" nginx config is barely even optimized. There are lots of other variables that you can tweak to get even better performance and blow Caddy out the window, but those tweaks are going to depend on the specific workload you expect to handle. There isn't a single, perfectly optimized, set of values that's going to work for everyone.
The beauty of Caddy is that you get most of that performance without having to tweak anything.
- teknopaul 4y agoNginx scales to 1,000,0000 workers per vm in my tests, but bandwidth is silly. I got those results by seriously limiting the junk in http headers. Not with real browsers. If you have that demand for any commercial service, you have money to distribute your load globally across more than one nginx instance.