-
Notifications
You must be signed in to change notification settings - Fork 72
Poor large binary streaming throughput #75
Comments
Yea, we've mentioned in passing before that adding BPD would be useful, but haven't prioritized. As a stop-gap, if you expect to be streaming large bodies and would like to lift the window size limit, you should be able to do so by configuring the h2 server or client before giving it to tower-grpc. For the client, configure the |
Hi Sean, Apologies, I'm a bit new to tower and h2 - would you mind showing me a brief snippet that properly does this configuration? Thank you |
I'll use the hello_world server example. When creating a new // snip ...
let new_service = server::GreeterServer::new(Greet);
let mut builder = h2::server::Builder::new();
builder.initial_window_size(some_number);
builder.initial_connection_window_size(maybe_some_other_number);
let h2 = Server::new(new_service, builder, reactor.clone());
// snip ... |
Thank you! I have the server configured now, but also having issues figuring out how to modify the tower client example in a similar manner. |
My current attempt was to do this:
but this gives me |
The new method is only public within the crate: And trying to do the following will fail because
|
Yea, looks like the only way currently is to use the |
Thanks - I've temporarily forked tower-h2 and made the Handshake::new method public (it seems like this should be a safe thing to expose). Is it possible to make such a change in master? https://github.com/SEED-EA/tower-h2/commit/37a56689d37ee366b0ebfb7002a725def6832ec4 Note: I've changed my client/server to 65536 * 2048 as per the grpc posts on the subject, and I'm getting much better transfer rates. Cheers, |
Hi, any update on this? |
I'm currently running into a problem of poor streaming throughput using tower-grpc, where it's taking 45 seconds to send a 168mb file from client to server - the binary data is chunked up and streamed, and I've tried 16k, 64k, 1mb, 2mb, and 3mb chunk sizes (all around ~45 seconds).
After reading some of these threads, I have a suspicion that there could be a similar problem here:
Notably:
I'm not exactly sure how or where to make this change with tower, so I was hoping the resident experts would have an idea or suggestions on what to look at for fixing the throughput.
Thank you!
Graham
The text was updated successfully, but these errors were encountered: