Nginx Configuration

Nginx configuration

Within this menu you may change different aspects of the Nginx configuration, including rate limiting.

Global Nginx options:

Worker connections: Sets the maximum number of simultaneous connections that can be opened by a worker process. Official documentation.

Client Body Timeout: Defines a timeout for reading client request body. The timeout is set only for a period between two successive read operations, not for the transmission of the whole request body. If a client does not transmit anything within this time, the request is terminated with the 408 (Request Time-out) error. Official documentation.

Client Max Body Size: Sets the maximum allowed size of the client request body, specified in the “Content-Length” request header field. If the size of a request exceeds the configured value, the 413 (Request Entity Too Large) error is returned to the client. Official documentation.

Client Header Timeout: Defines a timeout for reading client request header. If a client does not transmit the entire header within this time, the request is terminated with the 408 (Request Time-out) error. Official documentation.

Keep Alive Timeout: Sets a timeout during which a keep-alive client connection will stay open on the server side. The zero value disables keep-alive client connections. Official documentation.

Client Body Buffer Size: Sets buffer size for reading client request body. Official documentation.

Send Timeout: Sets a timeout for transmitting a response to the client. The timeout is set only between two successive write operations, not for the transmission of the whole response.

Rate limit:

Rate limiting is one of the most useful features of Nginx, can be used for security purposes, for example to slow down brute force password guessing attacks. It can help protect against DDoS attacks by limiting the incoming request rate to a value typical for real users, and (with logging) identify the targeted URLs. More generally, it is used to protect upstream application servers from being overwhelmed by too many user requests at the same time.

Enable Server Wide Rate Limit: Allow to limit the amount of connection per second or minutes a specific IP address could make. Official documentation.

Enable "Dry run mode" on Rate Limiting: The “dry run” mode does not limit the requests processing rate. However, such excessive requests are still accounted in the shared memory zone and logged. Official documentation.

Change the Nginx Rate Limiting Logging Level: Sets the desired logging level for cases when the server refuses to process requests due to rate exceeding, or delays request processing. Official documentation.

Count only dynamic page access: Decide whether you count each request per IP, including static content request or only count the request on dynamic pages (html and other).

The maximum number of connections allowed: This is the maximum amount of connection a single IP could make during the interval set.

Rate per second or per minute: The maximum amount of connection will be counted either per second or per minute.

Rate limit burst (-1 to disable): Define the maximum number of excessive requests that await to be processed at the specified rate.

Rate limit burst delay (-1 to disable): Placing 0 will add the “nodelay” to the burst rate limiting. Other digits will define the amount of burst request that can be sent without any delay to the back-end server (based on the slot available).

Sidebar