Perform action based on load avg
        Posted  
        
            by 
                sfx
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by sfx
        
        
        
        Published on 2012-08-30T14:50:53Z
        Indexed on 
            2012/08/30
            15:39 UTC
        
        
        Read the original article
        Hit count: 373
        
I'm running some web applications on an debian server and have to struggle with ddos attacks sometimes. It's eating up all my resources and I can't ssh anymore into the server. An idea was to drop all connections if the load avg is too high, so there are still resources for me and accept new connections if the load avg is low enough. Since this has to work under heavy load I'm afraid a cronjob wouldn't be fast enough or take too much resources.
tl;dr: Is there a way to configure the behavior if the load avg is above a specific threshold?
© Server Fault or respective owner