Skip to content

(WIP) feat: support concurrent ping frame - #995

Draft
jimages wants to merge 1 commit into
hyperium:masterfrom
jimages:feature/concurrent-user-pings
Draft

jimages wants to merge 1 commit into
hyperium:masterfrom
jimages:feature/concurrent-user-pings

Conversation

@jimages

@jimages jimages commented Nov 2, 2026

Copy link
Copy Markdown

The HTTP/2 protocol allows multiple PING frames to be in flight concurrently on a single connection. However, H2 currently supports only one outstanding PING at a time.

For example, if a developer wants to send three PINGs, they must wait for each PING to complete before sending the next one. This introduces unnecessary delays compared to sending the PINGs at fixed intervals (e.g., every 30 ms), without waiting for the previous PING to complete.

Could we add support for concurrent PINGs in H2? Node.js already supports this functionality, allowing up to 10 outstanding PINGs per session.

Reference: https://nodejs.org/api/http2.html#http2sessionpingpayload-callback

Return an owned lazy future from PingPong::ping, matching each ACK by a
unique payload. Bound pending state and retain legacy send_ping/poll_pong
cancellation and drain behavior.

Reuse existing shared ownership and connection/legacy wakers. Add focused
out-of-order ACK, cancellation, bounds and golden compatibility tests.

Validated with full library/integration/doc suites, supplemental localhost
TCP tests, Hyper keepalive checks and a pinned Rust 1.63 library build.
@jimages
jimages force-pushed the feature/concurrent-user-pings branch from 74c3b67 to 3833a10 Compare November 2, 2026 04:14

This branch has not been deployed

No deployments
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.

1 participant