performance guide for nginx L4 stream
r at roze.lv
Thu Oct 27 11:44:04 UTC 2022
> We are using the hey (https://github.com/rakyll/hey) tool to pump 50k requests per second and are seeing only 40k requests being received on the backend application side.
> Any other tcp configuration that needs to be tuned ?
I am not familiar with the tool but per documentation it should have some sort of error status report for the failed requests What it is for the 10k "missing" requests?
Are they "missing" (already) on nginx or just on the proxied backend(s)?
(in the provided nginx configuration I don't see any access/error log configuration - you could enable both to see if you actually get those 50k requests to nginx).
Are you testing from a single client (same server) or multiple?
Do you use keepalive or new connection per request (in the case of later might come close to the ephemeral port limit (~65k) depending on if tcp_tw_reuse is or isn’t configured)?
Have you tried with other tools like 'ab', 'httperf' or 'siege' to see if you get the same results/problems?
More information about the nginx