Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a linux box running Debian Sarge (old I know) and apache 2.0.54. It serves two kinds of files - regular web pages and small images, and a lot of large podcast mp3s. The podcast downloads swamp the connection and make the rest of the site unresponsive, so I'm looking to throttle the data transfer rate (not the request rate) of just the podcasts. I've set up haproxy using this technique which does what it says it will, but solves a different problem - even only 5 simultaneous podcast downloads is enough to saturate the link. In a perfect world, haproxy would support per-connection throttling, but it doesn't. So far I've looked at mod_bw (won't compile for me, seems unsupported), mod_cband (unsupported, widely reported as problematic) and iptables using tc. The iptables approach would allow me to throttle things, but would not be at all selective, slowing down everything on the server, not just the podcasts, so would just move the bottleneck without changing overall behaviour.

Ideas?

share|improve this question
add comment

1 Answer

Serve the podcasts on a different port, then traffic shape it with iptables?

share|improve this answer
    
Unfortunately I can't do that as the podcast downloads are requested from lots of different places that I don't have control over. I'm also not sure that traffic routed on the same machine goes through the firewall, i.e. whether traffic between haproxy and apache could be intercepted this way. I'm not that keen on using iptables for shaping - lots of people go on about using it, but it always seems to involve tc which is fiendishly complicated, plus there isn't a package for this ancient debian. –  Synchro Jan 12 '11 at 8:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.