0

today we ran apachebench on our server to stress test it. Of course, our system peaked and disk I/O was massive. Can we avoid that other people run such "tests" or some sort of attack to stress our system?

We are running apache on centos, iptables is running. Not really sure what's the best way to avoid that problem?

3 Answers 3

2

IPTables can limit the number of connections per second per origin host. xinetd also has similar functionality; but i don't think it's worth running it in front of Apache. Of course, a DDOS attack would go past that limitation (that's the first 'D'). At that point, syncookies and some router-based limits will keep your box from crashing, but service will suffer anyway.

2

You can use the recent module with iptables to block requests that come in to fast from a specific ip. Here is an article with some examples. If you get into more DoS attacks that overwhelm your bandwidth then you might need to get the ISP involved when this happens. The general topic you want to research is Denial of Service (DoS) attacks.

1

It takes 6 quadcore xeons running ab against one of our Varnish cache headends before our network is saturated. Varnish seems to have no problem. We could upgrade our Varnish machine to a 10g connection and push more machines at it, but, what's the point?

If one instance of ab is crushing your server, you might want to analyze your webapp/stack. ab tests only one page, which really should be one of the easiest things in the world for any webapp to handle.

What happens when you get an equivalent amount of real traffic that mimic's the ab test that crushed your server?

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .