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.
- Centrifugo at forum scale, loopback only
My setup script now installs Centrifugo, the realtime server my XenForo add-on uses for live posts, typing and presence. It is a verified release binary on loopback, in a unit that scores 1.1 in systemd-analyze, behind one exact nginx location with small tunnel buffers. A load test to 10,000 sockets set the defaults, and a run to 50,000 showed why the old default was wrong.
- One error page, compiled into nginx
My setup script now builds nginx with its own 401, 403, 404 and 50x page: neutral, 1.3 KB, light and dark, with a Home and a Try again button. It needs no configuration, still shows when PHP-FPM is down, is gzipped once at build time instead of on every request, and sends 502 and 504 as 503 so Cloudflare stops replacing it with its own page.
My setup script compiles nginx from source with only the modules the sites need. Release 1.22.47 removes one more: HTTP/3, the QUIC module. This post covers why, what the upgrade does to existing servers, and the A/B that showed the change cost nothing.
Why HTTP/3 had to go#
Every origin I run sits behind Cloudflare. Visitors get HTTP/3 from Cloudflare’s edge, but Cloudflare reaches the origin over TCP, with HTTP/1.1 or HTTP/2. It never opens a QUIC connection to the origin. So the QUIC listeners on my servers served no real visitor. All they did was answer whatever probed UDP port 443.
That’s a module compiled into every nginx, a patch to keep in step with it, a UDP port open in the firewall, and listener options to tune, all for traffic that never arrives. The script also patches nginx’s header filters to remove the
Serverheader, and the HTTP/3 filter was one of the three it had to patch. Now it patches two.Leaving
--with-http_v3_moduleout of the build doesn’t change the TCP request path. HTTP/1.1 and HTTP/2 don’t run any HTTP/3 code. I expected no difference in speed, but every change has to pass an A/B test, and an expectation isn’t a measurement.What an upgrade does#
The build recipe moved from 7 to 8, so every server rebuilds nginx once on its next
--optimize. Before the new binary is activated, the same run cleans the vhosts, because a vhost that still sayslisten 443 quicwould failnginx -ton a build without the module:include h5bp/tls/http3.conf;line in each vhost, with a marker comment. Those go, along with the commented-out copies that kept a vhost off HTTP/3 and an old comment about QUIC socket options.listen ... quic, anyhttp3*orquic_*directive, andadd_header Alt-Svcbecome# setup.sh: HTTP/3 removed (1.22.47): .... Every*.confunder/etc/nginxis scanned except the certificate directory.nginx -twith the running binary, or every file is put back and the report names them. In that case the new build stops at its own test and the old nginx keeps serving.If a file still can’t be edited, the build’s fit step comments out the leftover
http3*orquic_*lines when it activates the binary and adds a line to the report, instead of blocking the upgrade.The firewall changed too.
--basicnow opens80/tcpand443/tcponly, and replaces the any-protocol80and443rules older releases added, which also opened UDP.--optimizestill never touches the firewall, so an existing server keeps its old rule until--basicruns again. With nothing listening on UDP, that rule doesn’t expose anything.The configuration templates followed in the same release. The catch-all server no longer has a QUIC listener (the one I added after the first site on HTTP/3 became everyone’s default).
h5bp/tls/http3.confis kept as an empty file, so an old include still passes, and the templates’ CI rejects any QUIC listen,http3*orquic_*directive, orAlt-Svcheader.On the Xeon E-2236 test host,
--optimizefrom 1.22.46 to 1.22.47 took 3 min 28 s. The XenForo vhost lost only its twohttp3.confincludes. UDP 443 sockets went from 16 to 0, while TCP 443 and HTTP/2 stayed as they were, and an unknown name still got no certificate. A second--optimizechanged nothing.The A/B#
1.22.47 shipped with functional tests only. The cycle was paused for other work on the test host before the throughput A/B ran, and the changelog said so. I ran it during the next cycle.
The method:
nginx-build.sh build-arm, one with 1.22.46’s tool (recipe 7, with HTTP/3) and one with 1.22.47’s (recipe 8, without). Same nginx 1.31.10, same libraries, LTO on, no BOLT, so the comparison is the recipe and not a BOLT profile./etc/nginxtree, so the HTTP/3 includes were present for 1.22.46 and gone for 1.22.47, as on a real server. The 1.22.47 tree also carries that release’s guest-cache fixes, which add one more variable to the XenForo cache gate, so the A/B covers both request-path changes.Median requests per second, with the min-max of the five rounds:
Every tier lands between -0.4 % and +1.0 %, and on every tier the two ranges overlap. Removing HTTP/3 neither helped nor hurt, which is what you’d expect from a module that never runs on the TCP path. I didn’t compare p99 latency here: the summary kept it from a single round, which is too noisy to read either way.
The BOLT column is a side result. On the two cached tiers, where nginx does almost all the work, the installed BOLT build is 2.6-3.6 % faster than either LTO-only build. On the PHP tiers nginx is a small share of the time, so it makes no difference there. That matches earlier BOLT results: it pays where the binary itself is the bottleneck.
Why the numbers were lower than the morning’s#
The PHP tiers in this A/B sat well below the baseline I recorded the same morning on the same host and build: member home 314 instead of 349, uncached guest home 380 instead of 393. Nothing in nginx changed between the two. If I had compared the new arm against the morning’s number, I’d have reported a 10 % regression that doesn’t exist.
The cause was the test data. XenForo logs every thread view in
xf_content_activity_log, and by the afternoon a day of benchmark runs had added 166k views. The home page’s trending query sums that table on every member request. MariaDB’s CPU per member-home request rose about 60 %, and the PHP tiers slowed with it.It didn’t affect the result, because every arm ran on the same data, interleaved round by round. It’s still a lesson worth writing down: a benchmark changes the data it measures. Compare arms run side by side in one session, with the order rotated, the way the PGO post ran its builds, and treat a baseline from another day, or even earlier the same day, as a rough reference only.
What I didn’t measure#
Updating is the usual
--optimize. It rebuilds nginx once, cleans the vhosts first, and leaves the firewall alone. Run--basicafterwards if you also want UDP 443 closed.