Scenario ... an Apache httpd web server is distributing requests around between a number of Apache Tomcat instances on different computers (perhaps using mod_rewrite to allocate the requests). If a Tomcat instance become unavailable (i.e. if the host running it is taken offline) then it's to be removed from the pool, and if it comes back on line it's to be added to the pool again.
Sound complex? The basis can be quite a simple Perl script such as the one we wrote during today's course - source code
here.
A regular ping around the machines that may be in the pool establishes which are present, and if the availabiity has changed the RewriteMap is rewritten. Place a pause of a few seconds into the loop and try again ....
(written 2007-02-09)
Associated topics are indexed under
A163 - Web Application Deployment - Network Configuration and Security [3448] Checking all the systems on a subnet, using Expect and Tk - (2011-09-18)
[2489] Parallel Pinging, using Python Threads or Expect spawn lists - (2009-11-02)
[2052] How was my web site compromised? - (2009-02-24)
[1904] Ruby, Perl, Linux, MySQL - some training notes - (2008-11-23)
[1712] As different as night and tyres - (2008-07-18)
[1666] Slow boot and terminal start on Linux boxes - (2008-06-05)
[1408] Wireless hotel tips - FTP and Skype connections failing - (2007-10-26)
[511] Domain Forwarding - 2 ways of doing it - (2005-11-29)
[506] What are DHCP and DNS? - (2005-11-27)
[332] Looking up IP addresses - (2005-06-01)
[267] Searching security holes - (2005-04-04)
[37] Security and Safety - (2004-09-03)
[11] A bolt of lightning on Multicasting - (2004-08-11)
P224 - Perl - Intersystem Communications [2970] Perl - doing several things at the same time - (2010-09-25)
[2876] Different perl examples - some corners I rarely explore - (2010-07-18)
[2695] TCP v UDP / Client v Server - Python examples - (2010-03-25)
[2402] Automated Browsing in Perl - (2009-09-11)
[1918] Perl Socket Programming Examples - (2008-12-02)
[604] Perl - multiprocess applications - (2006-02-13)
Some other Articles
In answer to 'am I glad I started a blog' ...Save the Train - an updateI'm not the fatherJava beans and classes, .war and .jar filesHeartbeat script in PerlWell House Manor in the SnowMaking a mountain out of a molehillJava Deployment course - lunch breakRail trouble forced me to buy hotells -l report, Linux / Unix - types and permssions