HTTP limit conn directives

limit_conn_zone directive

http context; allocates shared state for counts keyed by a value; empty keys are not counted.

Formal Syntax & Structure

nginx syntaxnginx
limit_conn_zone key zone=name:size;

Parameters & Attributes

NameTypeDescription
keyexpressionIdentity for active request accounting; empty keys are excluded.
zonezone=name:sizeShared storage for per-key counters.

Working Example

Example Snippetnginx
limit_conn_zone $binary_remote_addr zone=streamclients:1m;
Nginx Reference