﻿# Distinguish a blocked HTTP stream from a blocked connection

Check stream and connection credit separately before attributing delayed delivery to model execution.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/guide-http2-stream-window/
Language: en

Several token streams share one multiplexed connection. One slows down, and operators blame model decoding even though the model continues producing output. HTTP flow control can block response data when the receiver does not return credit. Determine whether the blocked resource belongs to one stream or to the shared connection before changing GPU scheduling.

## Follow credit at both levels

HTTP multiplexing maintains flow-control state for individual streams and for the connection. Sending response data requires the applicable credit at both levels. A stream can therefore stop while others continue, or shared connection credit can hold back several streams. Protocol control frames follow their own rules. Do not read a lack of response data as proof that the transport cannot exchange any information at all.

## Identify the receiver that stopped reading

Trace the consumer from the HTTP library through decompression, event parsing and application delivery. A slow interface, a full local queue or blocked callback can prevent timely consumption. An intermediary can be the immediate receiver on one hop while forwarding to another slow consumer. Keep each hop's buffering and credit separate. A fast origin-to-proxy transfer does not prove that proxy-to-client delivery remains healthy.

## Separate HTTP flow control from TCP

The underlying transport has its own receive and congestion behavior. A blocked HTTP stream and a transport-level bottleneck can look similar in an application graph but have different evidence. Compare stream and connection diagnostics with socket observations where available. Avoid increasing every buffer before locating the responsible layer. Larger buffers may hide receiver delay temporarily while increasing memory held for clients that never catch up.

## Reproduce selective backpressure

In an isolated fixture, open concurrent synthetic streams and deliberately slow one consumer. Observe whether unrelated streams continue and whether queued bytes remain bounded. Then slow consumption for the connection as a whole to expose shared behavior. If testing a streaming RPC implementation, remember that a successful write call can mean the library accepted data into its own machinery, rather than that the peer application consumed it. Measure the actual observation point.

## Choose the repair from the evidence

If one consumer is slow, apply bounded queues, cancellation or an application-level slow-client policy. If a proxy mishandles credit, correct that hop's configuration or implementation. A connection-wide bottleneck may justify revisiting pooling, but additional connections are not a substitute for controlling per-client memory. Acceptance means the system identifies the blocked scope, preserves unrelated progress where the protocol allows it and releases abandoned work predictably. It does not imply that flow-control tuning increases model token production; the repaired stage may only improve delivery of tokens already produced.

## Primary references

[HTTP/2](https://www.rfc-editor.org/rfc/rfc9113.html). Defines stream-level and connection-level HTTP flow control.

[Transmission Control Protocol](https://www.rfc-editor.org/rfc/rfc9293.html). Explains the distinct underlying transport receive and congestion mechanisms.

[gRPC Flow Control](https://grpc.io/docs/guides/flow-control/). Explains receiver backpressure and the difference between a framework write and network delivery.

Related reading: [Request deadlines: budgeting queueing, prefill and streaming](/journal/provider-request-deadline-stage-budget/); [Request cancellation: testing the full client-to-engine chain](/journal/provider-client-disconnect-cancellation-chain/).
