Server Move 1

After our server had a near-death experience last week (its hard disk disappeared after a reboot), a couple of friends and I have been busy setting up a new server during the last few days. Not only a good opportunity to switch from SuSE 8 to RHEL 4, but also for installing the latest and greatest software, and for setting things up in the right way.

ipac -> MRTG

To monitor network traffic, I have used ipac-ng so far (screenshot). It is good for monitoring traffic on a single host, but what I really wanted was the Multi Router Traffic Grapher. Last time, I just couldn't figure out how to use it for anything but monitoring external devices with an SNMP interface.

This time, I searched for "mrtg snmp howto" on Google, and came up with a PDF that described how to set it up without SNMP. You just need a script that returns one or two values, and configure MRTG to call it. Couldn't be easier. Here's part of the configuration and the script, and a screenshot.

mod_throttle -> mod_bwshare

Putting your photo collection into a Web server has the disadvantage that from time time a braindead mirroring tool comes along and hammers the server with a never-ending stream of requests. With Apache 1.3, I have used mod_throttle to block ill-mannered visitors. It keeps track of how many requests have been received from an IP address, and blocks or slows down any further requests once a limit has been reached. One problem with this module is that to reset his count to 0, a visitor must not make any request for a certain time.

Because mod_throttle has not been ported to Apache 2 yet, I had to look for a replacement. What I found is mod_bwshare, which uses statistical shaping to detect unusual request patterns. Instead of a timeout after which the counter is reset, it keeps track of the average number of requests per second, and allows clients to exceed the limit for some time (screenshot). Once they accumulate too much debt, further requests are blocked.

I first followed the installation instructions in the README. It worked and I even was able to make a shared module for the RPM-installed Apache, but as stated in the documentation, the shared module could not be configured from httpd.conf. Then I discovered apach2-mod_bwshare.rpm, which works quite well on RHEL 4.

Update: After switching the DNS records to the new server yesterday and getting some real traffic, Apache crashed two times. Probably mod_bwshare cannot handle graceful restarts - after I started doing full restarts, it seems to work fine.

23:15, 21 Oct 2004 by Carsten Clasohm Permalink | Comments (0)

RSS

Archive

October 2004
S M T W T F S
         
10  11  12  13  14  15  16 
17  18  19  20  21  22  23 
24  25  26  27  28  29  30 
31             
September 2008
July 2008
June 2007
May 2007
March 2007
January 2007
December 2006
September 2006
June 2006
April 2006
March 2006
February 2006
January 2006
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
January 2005
December 2004
November 2004
October 2004

Blog Categories

Hiking (5)
Desktop Linux (28)
Server Linux (5)
Palm (3)
Photography (5)
Politics (2)
Web Applications (15)

Notifications

Request notifications

Syndication Feed

RSS

Recent Comments

  1. Anonymous Visitor: Thanks
  2. Anonymous Visitor: AT&T U.S.
  3. Anonymous Visitor: All went well under CentOS 5.0 in Croatia (VIP network)
  4. Anonymous Visitor: tmp crypt not necessary
  5. Anonymous Visitor: Great article
  6. Anonymous Visitor: So it's not a Virus...
  7. Anonymous Visitor: Thanks! Helps also on Windows!
  8. Anonymous Visitor: Thank you
  9. Anonymous Visitor: Economic Incentives
  10. Anonymous Visitor: thank you