Search code examples
nginxload-balancingnginx-reverse-proxy

nginx least_conn is still doing round_robin


I have a fully working config doing loadbalancing over 2 upstream servers.

I want to use "least_conn"

When I put least_conn in, it still is doing round robin. I can confirm that other configs like "weight' and "ip_hash" are working as expected.

Is there some other configuration/setting that also affects whether least_conn is honored?

This is using nginx 1.18.0


Solution

  • For future reference. It was indeed working. Turns out that there is quite a large amount of buffer (default is ~1GB between a temp file and some in memory buffers) and the files that were being transferred were a little less than that.