In this article
Interpret limit_conn through active request accounting and protocol, rather than a socket inventory.
The operational scenario
A gateway keeps a single multiplexed connection open for an inference client. The operator expects a connection limit to permit every stream on that socket, yet concurrent requests are rejected. This need not indicate a faulty counter. The protective unit selected by NGINX differs from the physical connection inventory that the operator used to predict admission.
The trust-boundary mechanism
The limit_conn documentation counts a connection only when a request is being processed and its complete header has been read. For HTTP/2 and HTTP/3, each concurrent request is considered separately. HTTP/2 itself permits multiple streams on a connection. Thus an idle transport, an incomplete request and an active multiplexed exchange need not contribute identically to this particular admission gate.
Define the control contract
Define whether the desired control bounds active HTTP exchanges, transport sockets or active model generations. Specify the accounting key and applicable location, including inherited configuration. Long streaming responses can retain request occupancy after model work changes state. Conversely, internal work might outlive the external exchange. Neither case permits equating this edge limit with a precise GPU execution semaphore without another observation.
A step-by-step verification
First choose a disposable endpoint that holds harmless responses open. Establish its protocol and real transport count. Then open finite concurrent requests sharing the intended key and observe accepted and rejected exchanges. Close an accepted response and submit a replacement. Repeat with separate transport connections while preserving the same key. This isolates request occupancy from assumptions about client objects or pooling.
Evidence required for acceptance
Preserve effective limit_conn configuration, protocol negotiation, request start and completion times, and the limiter outcome where available. If dry-run mode is active, accounted excess is not enforced rejection. Acceptance means the observed accounting matches the declared request unit and key. Include a single-request control and an independently observed backend timeline to prevent engine admission failures from being misclassified as edge enforcement.
Failure cases and limits
This gate does not establish complete protection against slow incomplete headers, because its documented counting point occurs after headers are read. It also does not bound all upstream or application allocations. Those require their own controls. The useful result is a verified interpretation of a named NGINX boundary, allowing a security review to stop treating every setting containing connection as a socket-level guarantee.
Primary references and related reading
Interpret limit_conn through active request accounting and protocol, rather than a socket inventory. NGINX connection-limit accounting; HTTP/2 streams and multiplexing.
The proposed investigation of nginx limit conn multiplexed request unit is a proposed control review; no live security test was executed. Related reading: Read peer stream limits before opening more HTTP requests; Provider admission control: bound the queue before latency grows.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.