Wanted to follow up to say that you were spot on. The file was ~800mb and it was indeed caching the whole thing. We could see the file get served to nginx and then nginx continued to serve to the client. We were able to show that it was indeed doing least_conn by downloading a file that was multiple gigabytes in size. This exceeded the buffer and would tie up that connection. When that happby kenneth.s.brooks - Nginx Mailing List - English
Oh. Ok, good to know about the default temp file and buffers. Just checked and I think the 'large' file we are downloading is 800mb. We don't have proxy_cache or proxy_store set. We do have proxy_temp_file_write_size 250m; We ended up doing a test where 9 of those large files were all on server1, and it continued to round robin requests. Is that temp_file_size essentially per connection? If so,by kenneth.s.brooks - Nginx Mailing List - English
Thanks for the detailed response and taking the time to show some test examples. We did think that perhaps it was buffering. However, in our case, the "large" request is gigs in size, so there is no way that it is buffering that whole thing. I think our buffers are pretty small. Unless there is some absolute black magic that will buffer what it can, close the upstream, then open it agaiby kenneth.s.brooks - Nginx Mailing List - English
Perhaps another question that might help me debug it. Is there a way to see active connection counts to upstream servers? I have the status endpoint enabled, but that just shows me total active connections for the worker process as a whole, correct?by kenneth.s.brooks - Nginx Mailing List - English
Thanks for the response. I understand what you are saying about the worker processes. We have only a single worker process. I have 2 upstream servers. To validate: I am sending a request for a LARGE file. I see it hit server1. Server1 is now serving that request for the next couple of minutes. I send a request for a very tiny file. I see it hit server2. It finishes (server1 is still proby kenneth.s.brooks - Nginx Mailing List - English
Small update: Moved to 1.18.0 and still seeing the same results.by kenneth.s.brooks - Nginx Mailing List - English
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? Currently using nginx 1.16.1 (tryingby kenneth.s.brooks - Nginx Mailing List - English