Our church has a Gentoo Linux server with a number of audio files
(sermons mostly) that are available both for streaming (RealAudio) or
downloading. However, since people who download multiple files tend
to kill the bandwidth for RealAudio listeners, I'd really like to put
some rules like this in place:
1) SSH connections (i.e. me connecting remotely) get all the bandwidth
they can consume.
2) RealAudio streaming clients get all the bandwidth left after #1
that they can consume.
3) Web downloaders get all the bandwidth left after #1 and #2 that
they can consume.
3a) No single web downloader can download more than N files at a time.
So ideally, if no-one is using the server and User A wants to download
3 files, then they can have all the server's bandwidth. If User B and
User C connect to stream RealAudio sermons, however, then they will
get as much bandwidth as they need to get a good connection, and User
A will be given ONLY whatever bandwidth is left. And ideally User A
will not be able to download more than, say, 3 files simultaneously.
I can see I have my work cut out for me, so before I dive in too
deeply, I'd like to figure out which area to focus my efforts on.
I've seen tutorials on bandwidth limiting with Squid and CBQ
(
http://www.yqcomputer.com/ ), advanced Linux
routing and traffic control
(
http://www.yqcomputer.com/ ), mod_bandwidth for
Apache2 (
http://www.yqcomputer.com/ ), and at the moment
I'm not sure where to even start. (I'll give an example - in the
Squid tutorial, the author hints that it's possible to use Squid to
limit downloading traffic over port 80 to, say, 75% of available
bandwidth, but it's NOT possible to increase that to 100% if no one
else is using the bandwidth. So maybe Squid isn't the right tool
after all...?)
I would appreciate anyone who can point me in the right direction and
help me get started. Thank you!