proxy_headers_hash_bucket_size

Sets the size of hash buckets for storing proxy headers in NGINX.

Syntaxproxy_headers_hash_bucket_size size;
Default32
Contexthttp, server, location
Arguments1

Description

The proxy_headers_hash_bucket_size directive specifies the size of the hash buckets used for distributing proxy headers in the NGINX server. The primary purpose of this directive is to optimize the performance and memory usage of the hash table maintaining these headers, particularly in scenarios involving many proxy headers. A larger bucket size can help prevent collisions, which may enhance lookup speed when accessing these headers.

Config Example

http {
    proxy_headers_hash_bucket_size 64;
}

Setting the value too low can lead to performance issues due to hash collisions.

Excessively large values may waste memory, particularly for configurations with a limited number of headers.

← Back to all directives