1

I reverse proxy to an app which use way too many ram so I limited it to 5 connection via max_conns in an upstream block.
But when 5 connection is reached 502 error is fired but that not what I want, it would be better if connection just wait his turn (connection arn't long).

So an example of what I want with max_conns=3:

conn1 connect and nginx proxy it
conn2 connect and nginx proxy it
conn3 connect and nginx proxy it
conn4 connect and nginx makes it wait
conn5 connect and nginx makes it wait
conn1 finish
conn4 is now proxied
conn3 finish
conn5 is now proxied
conn2 finish
conn4 finish
conn5 finish
0

I believe you are looking for Queue which is only available in Nginx Plus

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.