Skip to content

[Q] How does maxconn differ from limit_req? #1

@ymmt2005

Description

@ymmt2005

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions