-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
95% of DHT find provider requests are trying to find relays #694
Comments
For now, let's just hard-code a set of relays and turn this off. |
It tries to find 3 relays, but we can reduce this to 1 or 2. |
And yeah, it should try to estimate relay stability to pick good relays. |
Ah, got it. It just tries 5 times. I'm pretty sure one of the issues here is that there are groups running relays with low connection limits. That's why we need to make sure we pick a stable relay. In the mean-time, I'd like to switch to hard-coded relays. |
I don't think hard-coded relays are a very good idea, we can't just route all the traffic to our 3 medium relays and call it day. Who else is a stable relay operator? |
The current issue is both stability and libp2p/go-libp2p-kad-dht#146. I'm not kidding when I say that 95% of the DHT requests are trying to find relays. |
This is a problem indeed, but hard-coding relays doesn't seem like the right solution. What relays to hard code? We don't have operating guidelines or known relay operators we can contact, and we (as pl) can't run enough relays to support the entire network. |
I completely agree. I just want to hard-code them for now until we fix the DHT. Right now, we have a nasty feedback loop where a significant portion of the relays' bandwidth is likely waisted by these queries. |
@Stebalien @vyzo is the problem simply that the DHT discovery queries for Another approach might be to have a pubsub channel where the relays are published. Hard coding a few peers in the pubsub channel for relay advertisements should be really easy and not eat too many resources. |
This search needs to be adaptive. We should start with target If the network can't give you 5 results because they are no 5 relays globally, you are constantly asking the impossible. You need to scale back. @aschmahmann using pubsub makes sense if the peer anyway supports pubsub. But I wouldn't want to make autorelay (part of the lower stack of libp2p protocols) dependent on a higher-level protocol. Can we use the routing-helpers to attach pubsub-based and DHT-based discovery in daisy chain? |
For sure, and using interfaces like Discovery or ContentRouting make sense to make this swappable as you suggest. However, it's worth noting that using the DHT as Discovery for a total list of values is currently pretty wonky since AFAIK the DHT doesn't cap the number of Provider Records per key, which can lead to some peers getting hammered with requests in addition to if multiple peers contain parts of the total value you basically end up with the issues that IPNS over DHT suffers from.
@raulk Yes and No. Yes, if you use the No, if you use the approach above without also doing something like your adaptive scaling (or just setting the number of relays to be small) we still end up doing many DHT requests in addition to listening to the pubsub channel (e.g. if we keep looking for 5 relays and they just aren't there). However, we could create a new utility/wrapper that has some linear or exponential backoff to wrap the DHT requests. Additionally, to distribute a persistent piece of data (e.g. a list of relays) over pubsub you need, at the very least, some chunks of the changes from libp2p/go-libp2p-pubsub-router#33 (e.g. repeated rebroadcasting is necessary like in go-ds-crdt, however, in the above PR which relies on libp2p/go-libp2p-pubsub#190 we are more bandwidth efficient and lower latency). |
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
I believe we have fixed this problem. If not, do you mind reopening, @Stebalien? |
We have. Thanks for closing. |
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see libp2p/go-libp2p#694
When combined with the issues outlined in libp2p/go-libp2p-kad-dht#146, this is spamming the network. Worse, we're doing this constantly.
Every 15 minutes, if we're connected to fewer than 5 relays, we search for relays
53 times until we give up, waiting 30s between each search.That means:
That means that a full third of the network (assuming they have auto-relay enabled) is asking for this key at any given time unless they happen to find
53 stable nodes.Key issues:
The text was updated successfully, but these errors were encountered: