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

Per-connection data limits #1342

Closed
sakridge opened this issue Apr 13, 2022 · 5 comments
Closed

Per-connection data limits #1342

sakridge opened this issue Apr 13, 2022 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@sakridge
Copy link

I believe these are the knobs for data limits:

https://docs.rs/quinn/latest/quinn/struct.TransportConfig.html#method.stream_receive_window
https://docs.rs/quinn/latest/quinn/struct.TransportConfig.html#method.receive_window

Would like to be able to set these per-connection.

Also, would be great to release this: #1315

I suppose if a client violates these settings, the connection is just dropped and it's up to the implementer to reject the next connection attempt from said user if so desired, does that sound right?

@Ralith
Copy link
Collaborator

Ralith commented Apr 13, 2022

Would like to be able to set these per-connection.

That seems like a reasonable thing for us to support.

I suppose if a client violates these settings, the connection is just dropped and it's up to the implementer to reject the next connection attempt from said user if so desired, does that sound right?

A QUIC client violating flow control limits is not correctly implementing the protocol, so the connection will be immediately terminated with a transport error. This should generally be quite rare as it indicates a serious bug in the client's transport layer. You could respond to transport errors by banning that user, but that seems a bit heavy-handed, since such errors are not disruptive to the server.

@Ralith Ralith added enhancement New feature or request good first issue Good for newcomers labels Apr 13, 2022
@sakridge
Copy link
Author

A QUIC client violating flow control limits is not correctly implementing the protocol, so the connection will be immediately terminated with a transport error. This should generally be quite rare as it indicates a serious bug in the client's transport layer. You could respond to transport errors by banning that user, but that seems a bit heavy-handed, since such errors are not disruptive to the server.

Ok. How about a client that drops and re-establishes the connection to reset their limits?

@sakridge
Copy link
Author

Would the implementation be similar to #1315 ?

@Ralith
Copy link
Collaborator

Ralith commented Apr 14, 2022

Ok. How about a client that drops and re-establishes the connection to reset their limits?

This would cause the in-flight data to be discarded, and hence neither consume increased server resources nor accomplish anything for the client. Flow control specifically governs data which has not yet been consumed by the peer application layer.

Would the implementation be similar to #1315 ?

Broadly, yeah.

@Ralith
Copy link
Collaborator

Ralith commented Aug 16, 2022

Dynamic connection-level flow control configuration was introduced by #1386. If anyone still specifically wants dynamic stream-level flow control configuration, feel free to open a new issue.

@Ralith Ralith closed this as completed Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants