in reply to IP traffic filter

The thing is apache cannot read from the database, database has the limits for the IPs. Algorithm::Floodcontrol seems to be a good idea.
Thank you Corion. If anyone has more ideas I will appreciate it. Thank you all who replied.