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

How long does it take to retry when there is no seeders found? #1394

Closed
hz0324 opened this issue May 17, 2018 · 1 comment
Closed

How long does it take to retry when there is no seeders found? #1394

hz0324 opened this issue May 17, 2018 · 1 comment
Labels

Comments

@hz0324
Copy link

@hz0324 hz0324 commented May 17, 2018

We set up a designated server to seed our files (more than 10000). This server app is designed to seeding files according to HTTP request.

For example, when a user want certain file, the web app send a http request to the server and then start the download process. On the server side, when it gets seed request, it will find the right file and start to seed it.

The problem is, it always takes 40~60 seconds before the downloading starts. We have tried solutions such as "set up our own tracker server" and "using webseed". The problem still exists.

So, we wondered: How long does it take to retry when there is no seeders found?
Since when the user side starts to try downloading the first time, the file hasn't been really seeded on the server side. It takes 5~10 seconds for server to really start seeding the file. So we thought this might be the problem, if the retry interval is big.

Please help, are we right? If this is the case, how can we make it small?
Thanks.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented May 17, 2018

How long does it take to retry when there is no seeders found?

WebTorrent treats the web seed as just another peer, so it should start to make HTTP requests to the webseed URL at the same time as connecting to other peers.

Since when the user side starts to try downloading the first time, the file hasn't been really seeded on the server side. It takes 5~10 seconds for server to really start seeding the file. So we thought this might be the problem, if the retry interval is big.

It sounds like you're making the server become an actual torrent peer, not a webseed peer. A webseed peer means you're just making the files available over HTTP, like hosting any other files on a website.

If you're only making your server become a seeding peer once the client asks you to, it might take a minute before the client retries since the client only searches for peers on a defined interval. It queries the DHT and trackers every so often (don't remember how much off the top of my head).

However, if you know when the server has completed seeding, then you can tell the client (maybe using a WebSocket) and the client can call torrent.addPeer(peer) (The peer argument must be an address string in the format 12.34.56.78:4444)


The correct way to do this, IMO, is webseeds. Host your files over HTTP and make sure to include both an xs and ws parameter.

Example of a proper magnet link: magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c&dn=Big+Buck+Bunny&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fbig-buck-bunny.torrent

@feross feross closed this May 17, 2018
@feross feross added the question label May 17, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.