Posts Tagged ‘failover’


August 17th, 2010 No comments

Spent some time today setting up a STONITH device using IPMI in pacemaker. Tried with stonith:ipmilan, but it wouldn’t work. Found notes in /var/log/messages like “can_fence_host_with_device: stonith-fs2 can fence fs-node: dynamic-list”. Testing the stonith command in the shell worked just fine.

After passing parameter pcmk_check_host=none the correct node was found as stonith device with

 stonith_admin -l testnode

Still pacemaker was not able to STONITH the testnode.

To cut the story short: The whole trick was not to use stonith:ipmilan but stonith:external/ipmi with the interface lanplus. The stonith:ipmilan seems to have a bug in playing together with the new stonith-ng of pacemaker 1.1 which went into SLES11 SP1.

My working config looks like this:

primitive stonith-testnode stonith:external/ipmi \
params hostname="testnode" ipaddr="" userid="admin" passwd="xxx"   interface="lanplus" \
meta target-role="Started"
Categories: Uncategorized Tags: ,

Load Balancing and Failover for Tomcat using the Apache HTTP Server

October 6th, 2009 No comments

Here just some collected thougths and links about load balancing and failover for tomcat instances. I’ll only look at options using an apache http server as frontend. I’m sure other proxy/load-balancers like nginx or haproxy are performing better as proxys, but they don’t provide the same level of intergration with tomcat (also based on this blogpost).

So, whats there:

  • mod_jk
  • mod_jk2 (just for completeness, its said that nobody works on mod_jk2 anymore )
  • combination of mod_proxy, mod_proxy_ajp (or mod_proxy ajp) and mod_proxy_balancer
  • the newcomers, also with mod_proxy:
    • mod_cluster
    • mod_heartmonitor

What to use, and how:

  1. The basic setup using mod_jk as described here for example. This already provides failover and simple load balancing.
  2. Another approach, using mod_proxy, mod_proxy_ajp and mod_proxy_balancer is described in this blogpost.

Ok, stop here, what are the differences, this blogpost tries to explain. To conclude, both seem to do a good job, choice is mostly a matter of taste and preferences.

Interesting about using mod_proxy balancer seems the possibility to choose beetween more advanced load balancing algorithms, like the combination of mod_heartmonitor and mod_lbmethod_heartbeat coming up with apache 2.3. An example of configuration for building your “dynamic cluster” with it can be found here.

mod_cluster is already released and seems to offer basic support for usage with tomcat, but the advanced features seem to be only usable with jboss (link).

Setting up Hearbeat failover for an IP-Adress on Debian Squeeze

October 2nd, 2009 No comments

Now, equipped with the possibility to create a new Debian-DomU every 5 minutes (see previous posts), we use this new gained knowledge to set up a high available frontend server for our services. The plan is to have two xen-vm’s running on different physical servers, which provide failover for our external IP in case the active server fails.

Read more…