Skip to content

fix(l7): track up to 1000 HTTP/2 streams per connection - #368

Merged
mayankpande88 merged 3 commits into
mainfrom
fix/http2-stream-cap-1000
Oct 6, 2026
Merged

mayankpande88 merged 3 commits into
mainfrom
fix/http2-stream-cap-1000

Conversation

@mayankpande88

Copy link
Copy Markdown
Contributor

Summary

The HTTP/2 parser tracked at most 100 streams per connection. gRPC clients multiplex long-polls over one connection by the hundred, and a long-poll gets no response headers until it returns, up to a minute later. At the limit those live polls were evicted (#365 evicts requests still waiting for headers first) and their results lost.

On a test cluster, one node with long-polling workers evicted ~350 streams a minute and completed fewer than a third of the streams it created.

The limit is now 1000. Streams whose response was lost are still reclaimed by the stream GC (2 minutes), and a full table is ~200 KB per connection.

Engineering detail

Local e2e: built the agent from this branch and from main and ran each in a local Docker VM (kernel 6.10). A Go HTTP/2 client made 300 concurrent requests to a handler that answers after 5s (long-poll shaped), 60s per run, two runs each, 3,600 requests per run. Main: 1,110 and 800 completed, 2,490 and 2,800 evicted. This branch: 3,600 and 3,600 completed, 0 evicted. The ebpftracer/l7 tests pass.

gRPC clients multiplex long-polls over one connection by the hundred. A
long-poll gets no response headers until it returns, up to a minute
later. At the 100-stream limit those live polls were evicted, oldest
waiting first, and their results lost. On a test cluster one node with
long-polling workers evicted ~350 streams a minute. Locally, 300
concurrent 5-second requests on one connection completed 800-1,110 of
3,600.

The limit is now 1000. Streams whose response was lost are still
reclaimed by the stream GC, and a full table is ~200 KB.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request increases the maxActiveRequests limit for tracked concurrent HTTP/2 streams per connection from 100 to 1000 in ebpftracer/l7/http2.go. This change accommodates gRPC clients multiplexing many long-polls over a single connection, preventing legitimate live polls from being prematurely evicted. There are no review comments, and I have no additional feedback to provide.

@mayankpande88
mayankpande88 merged commit ad35d55 into main Oct 6, 2026
7 checks passed
@mayankpande88
mayankpande88 deleted the fix/http2-stream-cap-1000 branch October 6, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants