I have an nginx between the clients of my web app and my nodejs express server. some of my clients have packet loss.
I'm testing with 20% packet loss (inbound or outbound - via Clumsy on windows, with chrome). I'm requesting a big resource on a simple express web server (500k bytes).
I'm encountering a very slow response time - each chunk (about 16k) sometimes arrives within < 10 ms, sometimes > 100 ms and in every test I have few chunks that arrives after a few seconds (even up to 20-40 seconds).
my upstream (express) served the whole resource to the ngnix within 0.6 seconds (according to the log per chunk in my express and the ngnix access log).
for reference - when requesting videoPlayback resource from youtube, and testing with 20% packet loss - the chunks are about the same size and each one arrives within less than 100 ms. so although I'm expecting a slower response time - 20 seconds for one chunk (not the whole resource) is a problem.
I found no errors in the ngnix error_log, no packet loss on the ngnix machine, played with the ngnix buffers (no buffers, bigger buffers) - no result there. no writing to the machine disc. no timeouts in the ngnix side.
any idea? any other relevant ngnix configuration? maybe the ngnix machine kernel tcp congestion control configuration? thanks!!