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

Use quic-go Transport instead of "shortcuts" #990

Open
AaronH88 opened this issue Apr 10, 2024 · 0 comments
Open

Use quic-go Transport instead of "shortcuts" #990

AaronH88 opened this issue Apr 10, 2024 · 0 comments
Labels
type:enhancement New feature or request

Comments

@AaronH88
Copy link
Contributor

Receptor currently calls the quic-go shortcuts quic.Dial and quic.Listen which comes with some limitations.

From the quic-go README:

When using the shortcut, it's not possible to reuse the same UDP socket for outgoing connections.
...
The shortcut can not set the `StatelessResetToken`, which is recommended in order to quickly recover from crashes 
/ reboots of our node (see [Section 10.3 of RFC 9000](https://datatracker.ietf.org/doc/html/rfc9000#section-10.3) .

The non shortcut path involves creating a quic.Transport object and using said object to create .Dial and .Listen connections. This .Transport will be reused for a given node.

I believe I am seeing an optimisation opportunity in using this .Transport approach. In debugging I am observing the connection between nodes being "cycled", closed and reopened in order to establish connections with other peers.

As well as using quic.Transport I have observed other quic.Config options that might be beneficial for receptor:

Allow0RTT bool Allow0RTT allows the application to decide if a 0-Round trip connection attempt should be accepted. This is sending the first payload along with the connection attempt.

TokenStore TokenStore The TokenStore stores tokens received from the server. Tokens are used to skip address validation on future connection attempts.

DisablePathMTUDiscovery bool This allows the sending of QUIC packets that fully utilize the available MTU of the path. If unavailable or disabled, packets will be at most 1252 (IPv4) / 1232 (IPv6) bytes in size.

Tracer func(...) This is a logging interface, allowing more data on the quic connection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant