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

Limit download/upload speed #15

Closed
KiraLT opened this issue Nov 5, 2020 · 7 comments
Closed

Limit download/upload speed #15

KiraLT opened this issue Nov 5, 2020 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@KiraLT
Copy link
Owner

KiraLT commented Nov 5, 2020

Depending on the torrent you use, if it has a lot of seeders, download speed can consume all resources (in my cases download speed reaches 20 - 30 MB/s).

The idea is to limit download/uploads speed. The limit can be global (for all active torrents) or for each individual torrent/file. The second option would be better, because for streaming 1MB/s it's enough.

Related:

@KiraLT KiraLT added enhancement New feature or request help wanted Extra attention is needed labels Nov 5, 2020
@omgbox
Copy link

omgbox commented May 19, 2021

There are some movements regarding this issue on webtorrent/webtorrent#2062. Let's home It won't stop like all the previous 6 pull requests:

looks like its awaiting to be merged to branch but last commit webtorrent#2023 no approval or blocked , might be few weeks or at least few months to see it all green.

@KiraLT
Copy link
Owner Author

KiraLT commented Jul 24, 2021

Finally, they released this feature, I will include this feature soon!

@omgbox
Copy link

omgbox commented Jul 24, 2021

Finally, they released this feature, I will include this feature soon!

I wonder if it is per torrent or global preset which effects the entire engine.

@KiraLT
Copy link
Owner Author

KiraLT commented Jul 24, 2021

Added speed limitations. Limitations are global, so when multiple torrents are downloading they will share network bandwidth.

There are two types:

  • Download speed, default is 5MB/s. In most cases is more than enough, faster speed could crash NodeJS.
  • Upload speed, default is 0. In many cases, you can't seed torrents (for legal reasons or when using services like Heroku).

These parameters can be changed by providing a config file or by ENV variables - docs

@KiraLT KiraLT closed this as completed Jul 24, 2021
@pataquets
Copy link
Contributor

@KiraLT I've checked the docs and had a doubt. Does 0 for upload speed means 'do not upload' or 'unlimited upload'?

@KiraLT
Copy link
Owner Author

KiraLT commented Jul 29, 2021

According to the docs:

For downloadLimit and uploadLimit the possible values can be:

  • > 0. The client will set the throttle at that speed
  • 0. The client will block any data from being downloaded or uploaded
  • -1. The client will is disable the throttling and use the whole bandwidth available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants