http2_max_concurrent_pushes
Limits the maximum number of concurrent HTTP/2 pushes that NGINX can perform.
Description
The http2_max_concurrent_pushes directive configures the maximum number of concurrent server push responses that can be initiated by the NGINX server when using the HTTP/2 protocol. This directive is applicable in both the http and server contexts, allowing server administrators to fine-tune how aggressively content is pushed to clients. When set, if the number of pushes exceeds the configured value, any additional requests for pushed content will be queued until the number of active pushes falls below this threshold.
The argument to this directive is a positive integer that specifies the maximum number of concurrent pushes. It serves to prevent server overload and manage resource usage, especially under high traffic conditions where numerous push requests could overwhelm the server's capabilities. Configuration of this directive can be crucial in scenarios where servers push pre-emptively, improving loading times during user navigation through anticipated resources.
By default, if not specified, the value is set to none, indicating no limit imposed by this directive, allowing as many concurrent pushes as the server or client can handle. Server administrators are encouraged to select values based on their infrastructure capabilities and specific application needs to achieve optimal performance without causing excessive load or delays.
Config Example
http {
http2_max_concurrent_pushes 10;
}
server {
listen 443 ssl http2;
http2_max_concurrent_pushes 15;
}Setting this value too low may hinder performance by excessively queuing push requests.
Misconfiguring this directive does not produce errors but can lead to suboptimal performance, requiring careful monitoring.