-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fixed size buffer for QUICStream instead of object stream #5
Comments
What would be the appropriate buffer size limits? Right now the default is set to 1 million bytes in Benchmarks should show the effect of different buffer limits. Increased buffers should increase throughput up to a point, but reduce latency. |
Is there a technical reason for needing a larger buffer here? By default a web-stream will buffer up a single message. It can be configured to buffer up a byte amount as I've described before. But if the Otherwise, buffering on the webstream is set using the When consuming a source, the Just a note on the BYOB stream. The consumer of the readable stream provides the buffer. So you'd call |
The quiche's buffer is nice and great. However because At the end of the day I think experimentation is needed here to really see the different effects. My preference for byte streams comes from haskell, where IO streams were byte streams all the way through the system. And of course unix pipes too. I don't like mixing the modality of systems as I think that could cause confusions down the line. Meaning object streams stay as object streams. Byte streams stay as byte streams. |
For this issue, we just need to add some config option for setting the max buffer size for the readable stream for |
The writable stream can have it's own buffer. do we want to apply this to both the readable and writable webstream? If so, do we want the limits configurable separately? |
I'm applying a buffer limit to both the readable and writable. They are configured separately with |
…QUICStream` * Related #5 [ci skip]
Can you make sure these options work well with quiche's own options. We would need these options for both Furthermore, is there any conflicts between options that may occur? That is quiche's options? Should we namespace our options between quiche options and our options to avoid conflicts or will that be annoying? |
|
…QUICStream` * Related #5 [ci skip]
…QUICStream` * Fixes #5 [ci skip]
Specification
The QUICStream should be configurable with fixed size buffer. It turns out BYOB streams is not relevant for this. So instead we just need the options to configure the high water mark and related options.
Right now the stream just takes whatever chunk is acquired from the quiche library. So technically it's an object stream and not a byte stream.
@tegefaulkes need your input here to expand the spec, as you've done this already in PK with the websocket streams and RPC streams.
Benchmarks should push large amounts of data and observe that it doesn't really in very large amounts of memory usage.
Note that the quiche configuration does have configuration regarding the stream buffer limits... and even the connection buffer limits too.
The
QUICStream
buffer limits is purely a JS thing. So those buffers in quiche is controlling rust's memory usage. Subsequently quic stream's buffer limits is controlling JS's memory usage.So:
If the quic stream buffer is full, it just stops reading from the quiche stream, which means the quiche stream buffer will be full, and that will produce backpressure on the remote side.
It's possible for the quichestream to be full before the quicstream is full.
Additional context
Tasks
QUICStream
.QUICConnection
,QUICClient
,QUICServer
, etc.The text was updated successfully, but these errors were encountered: