You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Streamable proxy drops/fails requests under high concurrent load (fixed 100-buffer channels, no backpressure) #5952
The streamable HTTP→stdio proxy forwards through two fixed-size (buffered=100) channels with non-blocking, drop-on-full sends, drained by single-consumer goroutines. Under high concurrent in-flight load (>~100 simultaneous requests) it degrades ungracefully — hard-failing or dropping — rather than applying backpressure. This is especially relevant to the Modern (2026-07-28) stateless path, which invites high concurrency (no session pinning).
messageCh/responseCh are buffered at 100 (hardcoded ~L175-176; no Option to configure).
SendMessageToDestination (~L295) and ForwardResponseToClients (~L305): select { case ch <- msg: return nil; default: return err } — non-blocking; on a full channel they fail/drop immediately.
dispatchResponses drains responseCh in a single goroutine.
If either consumer is briefly descheduled while >100 requests are in flight:
responseCh full → response dropped → the waiting client blocks until requestTimeout (60s default) → HTTP 504.
Evidence
Observed while building the Modern no-accumulation resilience test (#5837): a 1000-request concurrent burst intermittently produced a 504, root-caused by an MoE review to this backpressure gap (worse under -race scheduling). The test now throttles its own concurrency to sidestep it, but the production behavior remains.
Suggested direction
Make the buffer sizes configurable and/or apply real backpressure (blocking or context-bounded send) instead of drop-on-full, so burst load degrades in latency rather than dropped/failed requests. At minimum, document the ~100 concurrent-in-flight ceiling.
Context
Enhancement / resilience, surfaced by #5837 Tier-3 testing. Not a regression; pre-existing design limitation.
Activity
Test Modern load leaves no accumulated state
Test Modern load leaves no accumulated state
Test Modern load leaves no accumulated state
Test Modern load leaves no accumulated state
Add live e2e tests for dual-era stateless proxy behavior (#5981)