-
Notifications
You must be signed in to change notification settings - Fork 356
Request/Response Fragmentation & Assembly #63
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
Conversation
2ea0bbf
to
9729535
Compare
Here is an example request/response of a single payload fragmented across multiple frames: ``` SERVER ==> Writes from server->client: Frame[0] => Stream ID: 2 Type: NEXT_COMPLETE Payload: data: "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklm... CLIENT <== Input from server->client: Frame[0] => Stream ID: 2 Type: NEXT_COMPLETE Payload: data: "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmn... SERVER ==> Writes from server->client: Frame[0] => Stream ID: 2 Type: NEXT_COMPLETE Payload: data: "ijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstu... CLIENT <== Input from server->client: Frame[0] => Stream ID: 2 Type: NEXT_COMPLETE Payload: data: "ijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv... SERVER ==> Writes from server->client: Frame[0] => Stream ID: 2 Type: NEXT_COMPLETE Payload: data: "qrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabc... SERVER ==> Writes from server->client: Frame[0] => Stream ID: 2 Type: NEXT_COMPLETE Payload: data: "yzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk... CLIENT <== Input from server->client: Frame[0] => Stream ID: 2 Type: NEXT_COMPLETE Payload: data: "qrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd... CLIENT <== Input from server->client: Frame[0] => Stream ID: 2 Type: NEXT_COMPLETE Payload: data: "yzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl... ``` Note how only the first starts with "abc..." while the rest are chopped in the middle.
9729535
to
5454bb2
Compare
This is a rebase of #60 |
Status of Fragmentation
Relation to Head-of-line Blocking
PerformancePerformance of this causes a non-trivial hit, but it's not surprising, considering what this has to do. It drops on my machine from 2.8m to 1.9m request/response per second, even without fragmentation. The overhead is the scheduling machinery to handle both the possibility of fragmentation, and the
vs before this change
I have not spent enough time to truly do performance optimizations on this. Flight Recorder of No individual methods stand out, but in aggregate the Design ThoughtsAfter doing this, we may want to consider the contract for I made the change to make |
@stevegury What do you want to do with this PR? These changes are non-trivial and will become a real mess to try and merge as master keeps moving forward. |
That's on my todo list to integrate it. |
@stevegury I believe this PR has diverged a lot to be able to merge? |
Let's keep the branch, so that we can reuse it later as inspiration. |
Here is an example request/response of a single payload fragmented across multiple frames:
Note how only the first starts with "abc..." while the rest are chopped in the middle.