I'm hoping this is possible with mod_perl, since I'm already familiar
with it and fairly allergic to c, but can't seem to figure out the right
phase.
I've been seeing log files recently that point to a certain DDOS attack
brewing on apache servers. I want to write a module that keeps a timer
for the interval from when the apache child gets a network connection to
when the client request has been sent.
I need a trigger when a network connection is established and a trigger
when apache thinks it has received the request (before the response).
PerlChildInitHandler seems too early, since the child may be a
pre-forked child without a connection. PerlPostReadRequest seems too
late since I can't be guaranteed of being called if the request isn't
complete, which is the problem I'm trying to solve. I could clear a
flag in PerlPostReadRequest, but that would imply something is
persisting from before that would be able to read the flag.
Maybe I'm think about this all wrong. Any suggestions?
Thanks,
-Bill