I build an open-source gateway on top of OpenResty, and the first version of it was embarrassingly
slow: 18 % of plain nginx's throughput on the same hardware. The biggest single fix turned out
to be one that many reverse proxies, including Nginx Proxy Manager (NPM), still don't apply:
reusing connections to the backend.
This post shows the benchmark, explains the cause, and gives you a fix you can apply to NPM today
without switching anything.
The setup
Everything runs on one GitHub-hosted ubuntu-24.04 runner (4 vCPU AMD EPYC), pinned with
taskset / --cpuset-cpus so the proxies can't steal CPU from the load generator:
CPU What runs there
0 wrk , 64 keep-alive client connections
1 the backend: nginx:1.28-alpine returning 200 ok from memory
2-3 the proxy under test ( 2 vCPU , 2 worker processes)
Each scenario gets a 5 s warm-up and a 20 s measured run of GET / with a 3-byte response.…