nym icon indicating copy to clipboard operation
nym copied to clipboard

Profile with QUIC

Open futurechimp opened this issue 5 years ago • 4 comments

An interesting suggestion from the Telegram group - trying out QUIC for the mixnodes.

It's a good idea. We should build out an experimental branch and do some profiling work when we get a moment.

Having had a look at QUIC libraries in Rust, I'd guess that Quinn would be our best bet for a simple experiment - it's already Tokio-compatible.

The most important thing will be to ensure that a change like this actually provides performance improvements. In theory it should speed things up, but as Sphinx packet creation and decryption is our current bottleneck, we'll want to be pretty careful about getting good measurements, to prove to ourselves that it helps for our specific use case.

futurechimp avatar Jan 30 '20 13:01 futurechimp

Hi, There are three open source active implementations for Rust: https://news.ycombinator.com/item?id=21039462

Quinn is the only one of the three which does not bring support for HTTP3 (HTTP over QUIC). As Nym probably requires HTTP access, I suggest to consider Neqo as it is developed and supported by Mozilla themselves.

StEvUgnIn avatar Sep 28 '20 07:09 StEvUgnIn

We selected quinn because we do distributed systems and quinn aims more towards being a general purpose crate, while the other two aim more towards their specific use cases, like being a browser. In particular, rustls used in quinn should handle alternative certificate infrastructure better, despite the rustls maintainers' best efforts. I've heard code quality concerns expressed about all three crates, but the quinn maintainers are quite responsive, and routinely merge outsiders' pull requests that improve things, less sure about the others.

burdges avatar Sep 30 '20 08:09 burdges

I did some research and I think it would br nice to experiment with Crate curl https://docs.rs/curl/0.4.33/curl/multi/struct.Multi.html and see if it fits nym. We could fork libp2p/rust-libp2p and implement QUIC within using Crate curl

StEvUgnIn avatar Sep 30 '20 11:09 StEvUgnIn

You'll run into trouble with !Send and !Sync there. Also, curl looks limited for custom TLS handling. And unsure if it handles the server side.

I've no idea about your use case. It's hard to imagine HTTP3 being relevant for distributed systems, including the transport layer of a mixnet or blockchain, but it's useful for UX I guess.

burdges avatar Sep 30 '20 15:09 burdges