Skip to content

How to pack many requests in a single TCP packet with HTTP2 and HTTP3? #109703

Answered by MihaZupan
alexandrehtrb asked this question in Q&A
Discussion options

You must be logged in to vote

There are no guarantees, but we do try to pack as much data into buffers before flushing it to the network as possible.

Currently in the HTTP/2 implementation we have a queue (Channel) of frames to write to the connection, and we'll only flush after that channel is empty (or you reach some size limit).
If you happen to have multiple requests being sent at exactly the same time and they're in that queue at the same time, it's possible they'll end up being sent together.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@alexandrehtrb
Comment options

@MihaZupan
Comment options

@Clockwork-Muse
Comment options

Answer selected by alexandrehtrb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants