fastcgi_send_lowat

The `fastcgi_send_lowat` directive sets a limit on the amount of data sent by NGINX to a FastCGI server before the send operations can be considered blocking.

Syntaxfastcgi_send_lowat number;
Defaultnone
Contexthttp, server, location
Arguments1

Description

The fastcgi_send_lowat directive is used to optimize the way data is sent from NGINX to FastCGI servers by specifying a threshold for sending data. When the total byte count of pending data to be sent remains below this threshold, the process can send more data without blocking, which allows for better performance especially under high load conditions. This directive is useful in scenarios where low latency is essential, such as in web applications that rely on frequent, small responses from a FastCGI back-end.

The parameter for fastcgi_send_lowat is a single integer value that represents the number of bytes. When this value is set, if the amount of data queued to send to a FastCGI server exceeds this threshold, NGINX will begin to block or limit further send operations. This allows the connection to remain efficient by ensuring that network resources are used optimally without overwhelming the server. It can be particularly beneficial to fine-tune this value based on the application's needs and the performance characteristics of the backend.

Config Example

location /api {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_send_lowat 16384;
}

Setting this value too low may lead to excessive blocking and reduced throughput, especially under load.

Consult performance metrics to tune this value appropriately for your application and environment.

← Back to all directives