Related posts
- Deleting my bot filter: 2,400 lines, one proxy hop, and what an Angie map actually costs
I removed the optional Anubis bot filter from my provisioning stack: what it cost, how to migrate a host without taking the sites down, and an honest measurement of what is left in the Angie request path. The maps were already lean; one regex if was not.
- clang, PHP 8.4 and the missing zlib: the last round of compiled PHP
The final round of the compiled-PHP question: CentminMod's function alignment on its own, a clang build and PHP 8.4, with every module compiled from source. clang is the only build with a repeatable edge (+3 % on XenForo), 8.4 is slower than 8.5, and my earlier source builds were missing zlib.
- PHP-FPM, FrankenPHP, RoadRunner or Swoole? The PHP layer decides less than you think
Eleven ways to execute PHP, one application-shaped workload, then the real WordPress, XenForo and Chevereto pages. Worker runtimes are 1.4-1.6x faster, but the applications cannot use them without a port; PHP-FPM stays the default.
Every release of my provisioning script runs the same audit on a disposable server: clean Ubuntu 26.04, the full stack, three real applications, then load and security tests, then a restore to the exact package set it started with.
This cycle’s question was different from the usual tuning pass: which web server should actually sit in front of WordPress, XenForo and Chevereto? Angie is the current default. nginx is the obvious alternative, and the forks — FreeNginx, OpenResty, Tengine — all promise the same core with a different story. Caddy and OpenLiteSpeed are the two non-nginx designs people ask about.
The short answer: for these applications the event loop is not what separates the candidates. The generic full-page cache is. Every nginx-family build lands inside the run-to-run spread on the same work, Caddy serves the same static file just as quickly, and then it loses by two orders of magnitude on a cached page because its standard build has no page cache at all.
The test bed#
:443at a time, started as a transient systemd unit so its CPU is read from that unit’s cgroup. The production stack was stopped; only the web server changed.try_filessemantics, same TLS certificates, gzip level, keepalive, open-file cache and FastCGI parameters. The nginx-family servers also got the samefastcgi_cache: keyhost|method|uri|encoding, any cookie bypasses, 60-second TTL,ignore_headers Vary Set-Cookie.Accept-Encoding: identity, so per-request compression did not hide the server path; application tiers used gzip.wrk -t4 -c100 -d8s, a 2-second warm-up, three rounds. Servers rotate inside each round, because whichever configuration runs first keeps the CPU boost head start — the same trap I hit in the compression cycle.Results#
Requests per second, median of three rotated rounds. The cached column is the median of a WordPress post, a XenForo thread and a Chevereto explore page; the per-tier spread is 4-49 %, and the spread for the member rows is under 2 %. Caddy’s guest rows are uncached by design: its standard build has no FastCGI/proxy cache.
What the numbers say#
The nginx family is one server with several logos. Angie, nginx, FreeNginx and OpenResty land within the spread of each other on every tier, and the build that leads one application does not lead the next. Tengine’s older nginx 1.24 core is in the same band too. If the only question were requests per second per CPU cycle, switching between them would be a coin flip.
The cache is the product. A cached WordPress post answers at six figures per second; the same page through PHP answers at about 150. XenForo and Chevereto show the same gap: 125k vs 370, and 134k vs 1,203. That is not a 10% tuning difference; it is the difference between one PHP render every few minutes and one per visitor. Stock Caddy can serve a static file as fast as the nginx builds — and then it has nowhere to put the page. Its standard build has no FastCGI or proxy cache; adding one means a third-party module and a custom build, which is a different support story.
Caddy is not slow. It is uncached. Its static row is level with the nginx family, its real-application uncached page is only 5 % behind (1,203 vs 1,274), and it uses one sixth of the memory (78 MB against ~490 MB with 12 workers and a 256 MB cache zone). Its tiny PHP endpoint is 34 % slower, which is the FastCGI path, not the cache. On a site that genuinely cannot cache pages, the choice would be defensible. WordPress, XenForo and Chevereto are not those sites: their guest pages are the traffic.
OpenLiteSpeed is a different stack. It has no generic page cache either — LSCache only stores what an application plugin marks, and only WordPress has that plugin. Its fast path is LSAPI, a different PHP SAPI from the PHP-FPM pool every other candidate shared. Measuring it would compare two PHP builds, not two web servers, so it is excluded rather than reported as if it were comparable. If you want OLS, you are choosing its PHP integration and its plugin ecosystem, not a faster event loop.
The verdict#
Keep Angie. It is the same core as nginx for the work that matters here, it carries the modules this stack already uses (Brotli, njs for the Anubis cookie check, the ACME client), and the configuration tree in the repository is built around it. FreeNginx and OpenResty are credible drop-ins if Angie’s release cadence ever becomes a problem; nginx itself is the reference. None of them is worth a migration for throughput.
The thing worth migrating to is a cache. If a site is on a server without a generic full-page cache, that is the project, not the logo on the binary.
What else the cycle fixed#
The same audit found a release-blocking bug in the provisioning script: a fresh install with
--basic swap=8Gactivated the new swap file and then tried to rename it. Linux refuses to rename a file that is active swap, so--basicfailed and skipped sysctl, PAM limits, cron and the firewall. The fix validates the new file while it is inactive, renames the old one aside, moves the new one into place and only then activates it, with a rollback ifswaponfails.The configuration audit also found that a direct client could set
X-Forwarded-Host,X-Forwarded-Proto,X-Forwarded-ForandX-Real-IPfor PHP. A cache MISS could render absolute URLs for an attacker’s host and then store them; an application’s IP allowlist could be spoofed. The headers now come from a trusted peer (the Anubis Unix socket, loopback, or an operator-declared proxy) or from the real peer, and a probe from the public address confirms it. Anubis, which connects over a Unix socket, still passes its header.Two smaller fixes are in the same release: an adopted Elasticsearch node keeps its
http.hostbind through--optimize, and Chevereto’s media path no longer disablessendfileor sends two contradictoryCache-Controlheaders.The scripts, the raw tables and the restore manifest are in the repository.