I have a site where people can download large files (ie ISO files). As you can imagine the bandwidth to the server is limited. So I need a solution (preferably using node or Nginx) that can control the bandwidth.
For example imagine 3 users (A, B, C) who respectively want to download files X, Y, and Z. The Server has a total bandwidth of 10MB/s (for demonstration). B and C are regular users, A is a premium user. regular users are entitled to 1 MB/s at most (unless the server is maxed, then it's less) and premium Users are entitled to an equal share of the remaining bandwidth. Which means 10MB/s-1MB/s-1MB/s=8MB/s remaining bandwidth. Since A is the only current premium user online, he gets the full 8MB/s speed.
Is there a package or solution that would allow me to implement a bandwidth management system like this? Where Bandwidth for file downloads could be regulated using node.js?
