• # La doc

    Posté par . En réponse au journal regulation de bande passante via module apache. Évalué à 5.

    Salut Max,

    voici la doc contenue dans un fichier README que j'ai obtenu en téléchargeant le .deb :

    this module is a hack.

    i wanted bandwidth control for a few virtual hosts, but i did not like
    the userland methods -- they were inaccurate and buggy. i wanted to
    take advantage of the linux kernel traffic shaping which i was already
    using for managing my bandwidth costs. all i needed was a way to "paint"
    some packets from the webserver so that the traffic shaper could handle
    them appropriately.

    i chose to abuse the IPTOS bits ("type of service") to do this. userland
    is able to select IPTOS bits via setsockopt(2). this gives a communication
    channel between the webserver and the traffic shaper, and makes me happy.

    and so mod_iptos was born.

    i've since learned that IPTOS are being updated/replaced by something
    called DIFFSERV... and it sounds cool. but since my hack is in place and
    working i haven't been motivated to go the next step with this module.

    -dean (dean@arctic.org)


    at any rate -- here's a copy of the docs in the code:

    type-of-service bits in IP packets can be used for such things as
    quality-of-service guarantees, or for traffic shaping. this module
    allows you to set IP TOS bits on a per-directory basis (it'll also work
    for location and files containers of course).

    the four TOS bits are:

    lowdelay
    throughput
    reliability
    lowcost

    note that in ancient IP history you were permitted only to
    set none or one of those bits. at some point someone gave
    meaning to the bitwise-OR of the bits... and i'm too lazy
    to go look up those meanings right now. but since there are
    meanings to the bitwise-OR, this module accepts the '|'
    character as an OR operator to combine these bits.

    the magic keyword "none" will result in no IPTOS bits being set.
    (useful for a nested directory container to disable a TOS
    you've set on a parent directory.)

    there's only one command: IPTOS bits

    as in:

    # default to lowdelay TOS
    IPTOS lowdelay

    # choose throughput TOS for the video directory
    <Directory /my/big/video/directory>
    IPTOS throughput



    to test if things are working i suggest tcpdump. it will show you the
    tos bits on each packet.