Skip to content
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

Maximize DHT swarm size by adding other DHT bootstrap servers #5900

Closed
kilves76 opened this issue Jan 6, 2021 · 10 comments · Fixed by #8119
Closed

Maximize DHT swarm size by adding other DHT bootstrap servers #5900

kilves76 opened this issue Jan 6, 2021 · 10 comments · Fixed by #8119
Assignees

Comments

@kilves76
Copy link

kilves76 commented Jan 6, 2021

These DHT bootstrap servers could be added to maximize the size of the DHT swarm available to a Tribler client:

dht.libtorrent.org:6881
dht.transmissionbt.com:6881
router.utorrent.com:6881
router.bittorrent.com:6881
dht.aelitis.com:6881
router.bitcomet.com:6881

The initial swarms are regimented according to the app as many torrent apps do not permit adding more, or users don't know how. Adding them all as default maximizes a Tribler peer's chances of finding content and is a benefit to everyone.

@synctext
Copy link
Member

synctext commented Jan 6, 2021

thnx!
Do we override Libtorrent DHT bootstrap defaults?

@ichorid
Copy link
Contributor

ichorid commented Jan 6, 2021

AFAIK, we don't. At least there are no mentions of it in the code.

@ichorid
Copy link
Contributor

ichorid commented Jan 6, 2021

By default, Libtorrent uses dht.libtorrent.org bootstrap node.

@qstokkink
Copy link
Contributor

This does seem like something we could easily implement though: the add_dht_node and add_dht_router calls exist in libtorrent and should be available in the bindings (on session instances).

@egbertbouman
Copy link
Member

We're already adding DHT routers manually. We just need to extend the list in the DownloadManager:

DEFAULT_DHT_ROUTERS = [
("dht.libtorrent.org", 25401),
("router.bittorrent.com", 6881),
("router.utorrent.com", 6881)
]

@ichorid
Copy link
Contributor

ichorid commented Jan 6, 2021

@egbertbouman , what's the difference between add_dht_router and setting dht_bootstrap_nodes then? The former adds to the latter, right?

@egbertbouman
Copy link
Member

@ichorid Right, the add_dht_router function adds to the list and the dht_bootstrap_nodes sets the list.

@arvidn
Copy link

arvidn commented Jan 6, 2021

dht routers are not treated as regular nodes. They are only used when bootstrapping the DHT fails. for example if there aren't any nodes saved from the last session, or they all fail to be contacted.

routers could also be made to never be saved in the routing table, but I don't think there's any logic like that currently, but doing so might make sense in the future.

@ichorid
Copy link
Contributor

ichorid commented Jan 6, 2021

@synctext , so, is it possible to increase connectivity and get to bigger swarms by adding more bootstrap nodes to libtorrent?

@arvidn
Copy link

arvidn commented Jan 6, 2021

it's not obvious to me that it would have that effect. Especially if the routing table is already "full". And if the routing table isn't full, it may be caused by some connectivity problem where nodes are lost too frequently to be replenished. In which case the tweaks to the table maintenance settings might be in order. Say, more frequent bucket refreshes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

6 participants