1

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!!

hillsch
  • 11
  • 2
  • 1
    It's impossible to know without more information. Can you include your nginx config? Also, what does `htop` say on your server? Anything overloaded? – Andrew Eisenberg Jul 14 '19 at 19:02
  • thanks Andrew - in the end we found out that the congestion control algorithm was the default CUBIC and once we changed it to BBR (the new youtube-google algorithm) it solved the issue :) – hillsch Aug 15 '19 at 14:09

0 Answers0