0

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?

Synchro
  • 3,148
  • 6
  • 27
  • 38

1 Answers1

0

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

mgjk
  • 874
  • 3
  • 9
  • 20
  • 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 08:17