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

Seed only when I am the only seeder #994

Open
mitar opened this issue Dec 28, 2024 · 3 comments
Open

Seed only when I am the only seeder #994

mitar opened this issue Dec 28, 2024 · 3 comments

Comments

@mitar
Copy link
Contributor

mitar commented Dec 28, 2024

I could not find a way to fine-tune seeding strategy? I see the Seed boolean in config, but I would like to be configure seeding only when I am the only seeder, so to seed rare files, but not seed otherwise. Like an archive for less popular torrents. Is this possible to configure (when using this package as a Go library)? But I am not sure if it is really possible to get full seeding information for a torrent as a client? Probably only trackers have full information?

@anacrolix
Copy link
Owner

There's not really an easy or reliable way to determine if a torrent is rare enough that you're archiving it. Instead you're better off allocating some amount of upload bandwidth and prioritising certain torrents that seem to be less available. The availability can be obtained from trackers and DHT. So when you get a request for data for a torrent you're seeding, you would look up the availability for the torrent and use that to prioritise uploading.

Note that for archive seeding, I've had an implementation where I intercept incoming connection requests and match against archived torrents, loading the metainfo on demand. That way a single client can seed an indefinite number of torrents, in this case it was around 1 million torrents.

@mitar
Copy link
Contributor Author

mitar commented Dec 29, 2024

The availability can be obtained from trackers and DHT. So when you get a request for data for a torrent you're seeding, you would look up the availability for the torrent and use that to prioritise uploading.

But I do not see any hook for this in the Go library API? Or am I missing something obvious?

Note that for archive seeding, I've had an implementation where I intercept incoming connection requests and match against archived torrents, loading the metainfo on demand. That way a single client can seed an indefinite number of torrents, in this case it was around 1 million torrents.

This sounds amazing. Is this something which was implemented using this library?

@anacrolix
Copy link
Owner

On my phone right now, but yeah, nothing loudly exposed. You can do it with one of the callback options, or modify the code obviously.

Yes it was done with this implementation. It was really cool! A lot of advanced usages can't be shoved behind an API, but with code at just the right points become a very easy. I do think I exposed everything I needed here to tap in and do it. I think it was a wrapper around anacrolix/confluence.

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

No branches or pull requests

2 participants