-
Notifications
You must be signed in to change notification settings - Fork 210
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
Iroh Connection cannot adjust TransportConfig for outgoing connections #2872
Comments
My proposal would be to:
|
flub
added a commit
that referenced
this issue
Jan 9, 2025
Previously the TransportConfig was hardcoded for the client (client/server in QUIC terminology: client initiates the connection, server accepts the connection). This rendered some customisations on the server-side, as supported by the Builder, impossible since the client would negotiate different limits. Specifically the QUIC keep-alives were at a 1s or faster interval while the connection timeout was at 30s or less. This adds a new API marked as experimental which allows customising the transport config for clients. Secondly it also respects any custom TransportConfig set in the Builder for clients as well as servers. This is not a behaviour change since the parameters set by default are now moved to the Builder and due to how these are negotiated it does not matter that the server will now also have the same values set by default. Closes #2872.
4 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
Jan 23, 2025
) ## Description Previously the TransportConfig was hardcoded for the client (client/server in QUIC terminology: client initiates the connection, server accepts the connection). This rendered some customisations on the server-side, as supported by the Builder, impossible since the client would negotiate different limits. Specifically the QUIC keep-alives were at a 1s or faster interval while the connection timeout was at 30s or less. This adds a new API marked as experimental which allows customising the transport config for clients. Secondly it also respects any custom TransportConfig set in the Builder for clients as well as servers. This is not a behaviour change since the parameters set by default are now moved to the Builder and due to how these are negotiated it does not matter that the server will now also have the same values set by default. Closes #2872. ## Breaking Changes ### iroh If Builder::transport_config is used it will now also affect initiated connections, while before it only affected the accepted connections. ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [x] Self-review. - [x] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [x] Tests if relevant. - [x] All breaking changes documented.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was advised to create an issue from #2860 (reply in thread). Iroh-net's Endpoint::connect is hard-coded to use a TransportConfig of every-second keepalives with 30-second timeouts (latter default from Quinn), regardless of any TransportConfig that was passed to Builder::transport_config (which is only used for incoming connections). This effectively means that you can only increase the keepalive interval and reduce the timeout from these defaults.
I can't think of a great reason that the incoming and outgoing TransportConfig values should ever be different, so I think the default should be to use the Endpoint's configured values for outgoing connections. However, if there is a use case for this (perhaps different ALPNs should have different timeouts), a method like
connect_with(node_addr, alpn, transport_config)
could work well.The text was updated successfully, but these errors were encountered: