I abandoned OpenLiteSpeed and went back to good ol' Nginx
arstechnica.com
arstechnica.com
See my recent Shmoocon talk (yes yes, self promotion) for an example of a vulnerability that would be caught immediately in Nginx, but persisted in the OLS codebase for >=10 years: https://yewtu.be/watch?v=aKPAX00ft5s&t=2h29m28s
I was profoundly disappointed that the article didn't go on to describe how strace works, in the service of delivering a satisfying answer as to why the CPU was pegged.
This was a trend for a bit but I don’t know of any serious hosts off the top of my head who run LiteSpeed these days. Most are running either nginx or good ol Apache (sometimes both!).
(We run enterprise scale WP on nginx, and our competitors at this scale basically all do too.)
The overall trend in WP hosting has been away from shared and VPS hosting towards managed hosts, who provide a WordPress-specific environment and do things like upgrade WP and plugins for you. As a result, I can’t imagine there’s a huge percentage of sites using Caddy.
(That said, even a small percentage will be millions of sites, since the WP install base is massive.)
Well, to name a few...
- Stripe (https://twitter.com/caddyserver/status/1559591673511813120)
- Mercedes-Benz (https://github.com/caddyserver/caddy/pull/5275#issuecomment-...)
- Approximated.app (https://dev.to/carterbryden/how-to-allow-end-user-custom-dom...)
- FusionAuth (https://fusionauth.io/blog/unlimited-domains-fusionauth)
The problem is those using Caddy are shy, not that it's not used at all. I know this because I see users removing the `server` header on the Caddy forum all the time, and many of the large users are just shy of their technology stack when it comes to Caddy.
Disclaimer: Member of the Caddy team
Have you a source for that? I've been having this discussion (that php-fpm is slower than needed) but I haven't found any hard data.
My advice would be to try and see.
I presume you mean WordPress.com here (WordPress = open source project, WordPress.com = product by co-founder of WordPress; it's confusing). They did run LiteSpeed a long time ago, but haven't in at least a decade; they moved to Nginx.
(There's a comment quoted at https://news.ycombinator.com/item?id=6341947 from Barry Abrahamson, who's the .com systems guy - sadly, Wired appears to have removed the original. I also checked with colleagues who were there at the time.)
Edit: Also, this HN thread might be useful for further info: https://news.ycombinator.com/item?id=4578258
That said I am slowly migrating them to nginx as I get more comfort with it. Always interesting to hear about experiments with other stacks!
nginx + cache is a nice simple solution that just works well.
As to why Varnish + Nginx versus just Nginx + FastCGI or proxy cache, I was chasing the performance dragon. AIUI, Nginx's fastcgi and proxy caches just store the static-ified versions of dynamic content in flat files, and those files are accessed via the file system, which means they get cached into RAM whenever the file system decides they get cached into RAM. I had the free RAM, and Varnish's RAM-first approach felt like it would be faster. Plus, this was all for personal hosting, and playing with Varnish was fun. (Or at least "fun.")
One particular comment:
> "Nginx's fastcgi and proxy caches just store the static-ified versions of dynamic content in flat files, and those files are accessed via the file system, which means they get cached into RAM whenever the file system decides they get cached into RAM. I had the free RAM, and Varnish's RAM-first approach felt like it would be faster."
The pagecache should do a pretty good job holding file contents in memory for you! https://tldp.org/LDP/sag/html/buffer-cache.html
I haven't had to tune for this scenario, but I think this might be the one place where you want a high swappiness (and some swap spaces). This will let Linux move unused bits of memory into swap & let even more ram be used for pagecache.
In the future, a ramdisk is a great way to make files from disk fast in a manner where the caller is naive to this. For instance you could create a ramdisk and then give that path to nginx for the caching config.