Skip to content
Discussion options

You must be logged in to vote

We use QUIC and the request/response behavior for direct messaging. It seems the extra round trip happens because the request/response behavior creates a separate substream for each request.

I just double-checked, and yes, with the default config the protocol negotiation for a new substream requires a separate round-trip. We also support upgrade::Version::V1Lazy, which allows to send early application data together with the protocol info. I actually thought this was enabled by default, but seems like V1 is the default.

You can try overriding the upgrade version in swarm::Config::with_substream_upgrade_protocol_override and see if the extra round-trip still happens.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@lukaszrzasik
Comment options

@jxs
Comment options

jxs Aug 19, 2025
Maintainer

@dariusc93
Comment options

@lukaszrzasik
Comment options

@elenaf9
Comment options

Answer selected by lukaszrzasik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants