i'd like to port mod_iptos to 2.x <http://arctic.org/~dean/mod_iptos/> ...
and preferably have it accepted into the main distribution.
in 1.3.x it was trivial to do mod_iptos as a module because all i had to
do was setsockopt(r->connection->client->fd, IPPROTO_IP, IP_TOS, ...).
i've already sent a patch to [EMAIL PROTECTED] to get the apr support for that
under
way... but for 2.x there's a bit more complexity getting the socket.
there are many extra possibilities in a 2.x port, and i'm not sure which
way to go, so i'm looking for input first.
in the 1.3.x module i implemented two options:
IPTOS tos_spec
IPTOSthreshold num_bytes tos_spec
the first sets the default IPTOS to the specified value (and is
configurable per directory/etc).
the second works only for static responses and would change the tos_spec
if the response was greater than a certain size.
for example:
IPTOS none
IPTOSthreshold 2000000 throughput
this will segregate small and large responses and with many network
traffic shapers will automagically give your website better response times
when your uplink is choked.
for 2.x i suppose the right approach for implementing the threshold is via
filter. i assume there's some way to get the filesize when it's known --
and in cases where the filesize is unknown the filter could just change
the threshold after the threshold is passed (not ideal, but doesn't matter
for my needs).
i could see implementing this either as part of the core or as a module...
whatever seems to fit. (assuming a module can actually get a hold of the
client socket somehow.)
for old timers: it's been 5 or 6 years since i've looked at apache 2.x
source and things were in a heavy state of flux back then, so don't assume
i know the best way to implement this :)
suggestions welcome.
-dean
p.s. i have no doubt there are traffic shaping / bandwidth limiting
modules for apache 2.x, but those are only appropriate for a single server
and with no other uplink contention. the network is the right place to do
traffic shaping.