ajp_send_lowat
The `ajp_send_lowat` directive configures the low water mark for the AJP protocol socket to manage send buffer behavior.
Description
The ajp_send_lowat directive is used in NGINX modules supporting the AJP protocol, allowing fine-tuned control over the transmission behavior of data sent to AJP backend servers, typically used for connecting to Java application servers like Tomcat. When this directive is set, it specifies the "low water mark" for the AJP socket's send buffer, meaning that when the number of bytes in the send queue drops below this threshold, NGINX can consider the connection to be healthy and ready for more data. This allows for optimized flow control, avoiding scenarios where the connection becomes over-provisioned with data without sufficient flow back from the server, which could lead to inefficiencies or dropped requests when thresholds are exceeded.
The argument to this directive is a number, which sets the low water mark in bytes. By default, when not explicitly set, the directive is considered to be none, implying that the automatic system default is in use. By managing this setting, administrators can ensure that their NGINX instances are better equipped to handle high-load scenarios and prevent backpressure that can occur when buffers fill up unexpectedly, thus improving overall application performance and responsiveness.
Config Example
http {
server {
listen 80;
location / {
ajp_pass myapp;
ajp_send_lowat 16384;
}
}
}Setting ajp_send_lowat too low may cause NGINX to send data too frequently, increasing overhead.
Conversely, setting it too high could lead to buffer saturation and delays in data sending, affecting responsiveness.