Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve HTTP/2 stream interleaving #360

Closed
sbordet opened this issue Feb 24, 2016 · 1 comment
Closed

Improve HTTP/2 stream interleaving #360

sbordet opened this issue Feb 24, 2016 · 1 comment
Assignees
Milestone

Comments

@sbordet
Copy link
Contributor

sbordet commented Feb 24, 2016

Issue 481718 improved HTTP/2 stream interleaving by going from a model where the interleave quantum was the whole stream, to a model where the interleave quantum was the flow control window size.

Currently, for 2 streams, we generate DATA frames to fill the flow control window for stream1, then we write them. After the write stream1 is put at the end of the queue, and we generate DATA frames to fill the flow control window for stream2, then we write them. After the write stream2 is put at the end of the queue, and we generate DATA frames for stream1 again.

The reason of this scheme is that we wanted to generate as many DATA frame as possible to gather-write them in a single write.

A better scheme would be to make the interleave quantum the max frame size.

The idea would be to generate 1 DATA frame from stream1, then 1 data frame from stream2, then look if stream1's flow control window is exhausted; if not, generate another frame for stream1, then look at the flow control window for stream2, possibly generate a frame for stream2, and so on until the flow control windows are exhausted, and then perform a single gather-write.

@sbordet sbordet self-assigned this Feb 24, 2016
@sbordet sbordet added this to the 9.4.x milestone Feb 24, 2016
sbordet added a commit that referenced this issue Feb 29, 2016
Fixed by making the interleave quantum be the frame size rather than
the flow control window size.

Reworked HTTP2Flusher.process() to be simpler and properly
interleave frames.
@sbordet
Copy link
Contributor Author

sbordet commented Feb 29, 2016

Fixed by using the frame size and interleave quantum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant