0

I have an apache2 server with an application that uses a postgres db on Debian/Linux. The server has 1.2 gigs of ram.

On the client side (browser), if I keep refreshing the window (F5) non-stop for a long period of time (about 1 minute), apache2 and postgresql end up crashing, and all comes back to normal after they recover. This is due to the poor programming of the application, aspect I don't have control over, and the fact that I'm hammering the server with requests and it's trying to answer to all of them.

My question, are there tools on Debian that can see an abusive IP and block it for a certain amount of time? Anything will help.

Update: this is from a server side standpoint, abstracting the inefficient/load-intensive actions that every HTTP request require to complete. Forget about the application, think of it from a server standpoint.

Thanks

4
  • I found a module called mod-evasive. Commented Dec 15, 2010 at 2:36
  • 2
    A single user can hammer the server manually (pressing f5 rather than a executing a script to hammer automatically) and that's enough to bring down the server? It must have some serious issues!!!! Commented Dec 15, 2010 at 6:36
  • In this scenario every HTTP request uses up a lot of resources, and takes a long time to process. It's not a normal webpage, it's customized logic that does customized actions which take a lot of time. But we don't care about this here: the question is from a Server side standpoint. If you have any solution to propose, you're welcome to do so. Commented Dec 16, 2010 at 17:52
  • How to prevent apache2 hammering? Take away its hammer. Commented Dec 16, 2010 at 18:15

1 Answer 1

1

mod_evasive can do it as you've found. You can also do it with iptables, take a look at http://www.debian-administration.org/articles/187

2
  • I prefer doing this kinda thing with iptables. Feels like it's better to do this sort of traffic shaping as low level as possible. Commented Dec 16, 2010 at 18:16
  • Hi Tom, yes I agree with you. Commented Dec 22, 2010 at 19:30

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.