http2_streams_index_size

The 'http2_streams_index_size' directive sets the size of the HTTP/2 streams index in NGINX.

Syntaxhttp2_streams_index_size size;
Default128
Contexthttp, server
Arguments1

Description

The 'http2_streams_index_size' directive is used to configure the size of the index used for managing HTTP/2 streams within NGINX. This index helps the server efficiently manage the state and data for multiple simultaneous HTTP/2 connections. The defined size implies how many streams can be indexed before the server starts to behave differently in managing these connections. A larger index size can potentially improve performance by allowing more concurrent HTTP/2 streams, but it will also require more memory. Additionally, if the index fills up, older streams may be evicted from memory, which could lead to requests being delayed or dropped. Careful consideration should be taken when adjusting this parameter, especially on memory-constrained systems or under high loads.

Config Example

http2_streams_index_size 256;

Setting the index size too low may cause HTTP/2 requests to be delayed or dropped if the server runs out of available stream slots.

Increasing the index size will increase memory usage, be careful to avoid exceeding server memory limits.

← Back to all directives