-
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
Multiple DHTs #780
Comments
This has been resolved (we think). The plan is to run one DHT and have new nodes listen on the old protocol but only route requests to nodes in the new DHT. How does this work? If at least 20% of the network is running the latest DHT version (we can boost this by adding nodes to the network at launch), 99% of the time, the closest 20 nodes (old & new) to a target key will include a new node. That means, in 99% of the cases, a put/get from an old node will find a good node. Note 1: It's actually even better than this. As more of the network upgrades, the chance that an old node never enters the old DHT increases because new nodes will never return peers from the old DHT. Note 2: Old nodes backtrack indefinitely when finding content so they're pretty much guaranteed to find content published by new nodes regardless (because they'll keep trying until they do). Note 3: If 44% of the network upgrades, we can get to a 99.999% success rate. TODO:
|
What's the backtracking mechanism being described here & why do we need it ? Please can you elaborate a bit on it ? |
Working through this, I think I may be incorrect. Backtracking is asking further away nodes on the same query. This can be useful for:
However, I'm not actually sure if it will help with drift. With drift, we don't want to ask peers that we contacted on the query, we want to ask peers directly adjacent to the closest 20 peers. To do that, we'd probably have to ask the highest and lowest peer in the K bucket for their neighbors and expand the search that way. Really, I don't think this is worth it. But, if we magically have time, we might want to consider it. |
Closed by libp2p/go-libp2p-kad-dht#479 |
Design notes
We need to explore how the DHT fixes interact with the old DHT code and whether or not we want to fork the DHT. If we do fork the DHT, we have a few options:
If we decide to run two DHTs, we have a couple of options when querying.
The deciding factor will likely be limitations around how many parallel dials we can have. That is, querying both DHTs in parallel might slow down querying the new DHT because dials to the new DHT may have to wait on dials to the old DHT.
The same set of options apply to publishing content.
BONUS: We've frequently discussed running multiple DHTs (one for content routing, one for peer routing, one for IPNS, etc.). If we start down the path of running multiple DHTs, it's a short hop to one-dht-per-type.
Testing mechanics
We'll need to test each set of options and see:
Success Criteria
The text was updated successfully, but these errors were encountered: