Results 1 to 2 of 2
  1. #1

    Using apache or tc to set a session cap or max download speed

    Anyone know how to or can anyone point me in the direction to find information on how to cap sessions in apache or using tc?

    I want users on my site to be able to download a maximum of 90k/sec so that they don't use all of my bandwidth.

  2. #2
    Join Date
    Jul 2003
    London UK
    [ this should be in the technical forum, however ... ]

    There are a couple of modules for apache that will implement bandwidth limiting (mod_throttle and mod_bandwidth) but I never really liked how they were implemented.

    To use tc you will need a kernel with all the QoS queuing stuff compiled in.

    You will also need the relevant package for tc, part of iproute on debian.

    Then something like:

    Add queuing discipline:

    # tc qdisc add dev eth0 root tbf rate 220kbit latency 50ms burst 1540

    Check status:

    # tc -s -d qdisc ls

    Remove queuing discipline:

    # tc qdisc del dev eth0 root tb

    You should read up on how the different queuing disciplines (CBQ, etc) work, it can get quite complicated.
    Paul Civati
    Rack Sense Ltd UK Managed Services Provider
    Views expressed are my own and not those of the company.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts