scgi_limit_rate
The scgi_limit_rate directive limits the rate of outgoing SCGI responses.
Description
The scgi_limit_rate directive is used to control the bandwidth rate of responses sent to a client when using the SCGI protocol. This is particularly useful for managing resources and preventing a single client from consuming excessive bandwidth, which could adversely affect other users. By specifying a rate, you can ensure that the server delivers responses to clients at a controlled pace, enhancing overall performance and reliability.
The directive accepts a single argument that specifies the maximum amount of data to send to the client per unit of time. The specified value can include a unit suffix such as "k" for kilobytes, "m" for megabytes, or
Config Example
location /api {
scgi_pass backend;
scgi_limit_rate 200k;
}Ensure that the value specified is in bytes or uses the appropriate unit suffix.
If the directive is set in a lower context (like location), it will override higher context settings.