What's the state of dcutr? #5910
Replies: 5 comments 3 replies
-
Personally I don't really expect dcutr to work very well. I'm hoping for 10% success rate at best but I don't really have the data. I don't think WebRTC will be of any help because it still depends on the physical network, and we can't really do anything about that. Maybe with IPv6? |
Beta Was this translation helpful? Give feedback.
-
When the punchr project was first developed I ran a rust-client and had a good success rate, roughly matching what was reported in the campaign. |
Beta Was this translation helpful? Give feedback.
-
In my experience, it has been a bit of a hit or miss at times depending on the environment. In a good environment though, it was worked pretty well and had more of a success, although this was using TCP. With QUIC, I would say this can be the same but noticed some flakiness in the earlier days of quic and not sure about the success rate right now at this moment. |
Beta Was this translation helpful? Give feedback.
-
Actually, I hadn't had quic enabled, only TCP. Enabling quic raised the successrate significantly (this is from running multiple days): Total successful: 6687 So, at the moment, that's a 40% success rate per attempt and a 44% success rate per peer. Again, a little sad that this "magic" improvement happens without any prior indication that missing quic may be part of the problem. In the meantime, at least for my home network, I have figured out that it uses a "easy NAT", so no exceptional difficulties expected purely from the networking situation. I'll probably focus on local network for now to get my application logic working and then see if I find the time to get further into the dcutr debugging |
Beta Was this translation helpful? Give feedback.
-
Hi Matthias! As Elena I also run the So as to make this discussion helpful for future reference
can you elaborate on this? DCUtR was thought with the decentralized nature of libp2p in mind, as you can read more about here. But the fundamental concepts are similar to what tailscale presents on their article. @drHuangMHT can you elaborate on
why do you not expect it to work very well? And @dariusc93 can you elaborate also on
what in your usage experience is a good environment? Thank you all! |
Beta Was this translation helpful? Give feedback.
-
Hi everybody! I was wondering if you know the state of dcutr in rust-libp2p? The reason is that it doesn't work very well for me, but I'm not sure if that's because I'm using it wrong, have bad luck with my network environments, or it really just doesn't work well.
I'm aware that a few years back, there has been some effort to evaluate the performance of dcutr, for example by means of punchr. Talks I found on the Internet spoke of hole punching success rates between 90 and 60 %, depending on the network, VPN, etc.
My own success rates, tested by now on three different (semi)private networks, are more in between 1 and 10 % success rates. Is that just me, or do you get similar metrics?
I'm not actually doing much right now. More or less just walking the DHT, connecting to some random (10) relays, and having dcutr active, which does its thing pretty independently.
Any time I do get a dcutr
Event
, I update statistics of the form(these are particularly bad)
What I read from that is that the perfomance is, most interestingly, very consistent per peer. If it failed once, it'll fail again. If it's successful once, it'll be successful again (not seen in above stats but in others I got).
Never have I ever had a peer fail and then succeed, or the other way around.
This makes me wonder: Is there room for improvement on that protocol? Are there any plans to tackle that again? At the moment, assuming this is typical performance, it wouldn't be useful for any real world scenario at all.
There also the very wide open gaping hole between the dcutr spec and this popular article on NAT traversal that seems to explain in great detail why dcutr isn't, in fact, adequate.
Should I perhaps move away from dcutr and explore other options, I wonder. I haven't looked at the state of WebRTC in libp2p. Is that going to fix things, or is it a separate topic. Is direct connection between NATed peers high up on the prio list for future development at all?
Really looking forward to hearing your perspectives :)
Beta Was this translation helpful? Give feedback.
All reactions