-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
Short Answer: maxconn can limit the exact number of connections to the backend servers.
Long Answer:
limit_req is the standard nginx module to limit the rate of requests per second. Contrarily, maxconn limits the number of living requests.
This makes a significant difference when there are some slow requests. Slow requests may pile up and consume the number of connections to the backend servers. If the request rate is low, limit_req would not block excessive slow requests; maxconn, on the other hand, can effectively limit the number of piled up slow requests.
Further, as maxconn depends on yrmcds, you can use multiple nginx servers while maintaining the exact resource limit.