<div dir="ltr">Was investigating some issues today when we noticed that least_conn wasn't behaving as expected.<div><br></div><div style>upstream backend {</div><div style> least_conn;</div><div style><div> server unix:/tmp/sock-1.sock;</div>
<div><div> server unix:/tmp/sock-2.sock;</div></div><div><div> server unix:/tmp/sock-3.sock;</div></div><div>}</div><div><br></div><div style>The expected behavior for 4 simultaneous requests it should distribute them:</div>
<div style>sock-1: 2</div><div style>sock-2: 1</div><div style>sock-3: 1</div><div><div><br></div></div><div style>However, what we're seeing is:</div><div style>sock-1: 3</div><div style>sock-2: 1</div><div style>sock-3: 0</div>
<div style><br></div><div style>Which coincidentally lines up with the number of requests a socket can service simultaneously.</div><div style><br></div><div style>This is using 1.2.7</div></div></div>