| |||||||||||
| |||||||||||
Heartbeat script in Perl
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 17:28:03) Associated topics are indexed under P224 - Perl - Intersystem CommunicationsA163 - Web Application Deployment - Network Configuration and Security
Some other Articles
In answer to 'am I glad I started a blog' ...Save the Train - an update I'm not the father Java beans and classes, .war and .jar files Heartbeat script in Perl Well House Manor in the Snow Making a mountain out of a molehill Java Deployment course - lunch break Rail trouble forced me to buy hotel ls -l report, Linux / Unix - types and permssions 1638 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 at 50 posts per pageThis is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price. Link to Ezine home page (for reading). Link to Blogging home page (to add comments). |
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho | |||||||||||