How To Setup "XLR 6.0.0 Active/Hot-standby" High Availability Cluster


Shashank Srivastava -

This post explains how we can setup "XLR 6.0.0 Active/Hot-standby" High Availability Cluster so that we have a highly available XL Release instance, as described in the below documentation link.

For this tutorial, we will need 4 nodes as outlined below.

  • 1 HAProxy Load-balancer that also acts as/runs an NFS server - IP address
  • 2 XLR nodes also acting as NFS clients - IP address &
  • 1 MySQL Database server - IP address

Please note that my Node1's name is "shashank-server" & Node2s name is "node1".

HAProxy Configuration : -

I have attached the configuration file for HAProxy. Please make suitable changes in this file for your setup. I am explaining the last 2 lines below.

server shashank-server check inter 2000 rise 2 fall 3
server node1 check inter 2000 rise 2 fall 3

As we can see, the second field on both the lines depicts hostnames of XLR nodes & is followed by their IP addresses.

Rest of the configuration is self-explanatory.

XL Release Configuration : -

I have attached the xl-release.conf file for node 1 which is almost the same on the other XLR node. Only difference is in the node ID & hostname. We will need to make changes accordingly in both the files.

The most important part of this configuration is the artifacts location as mentioned below. Remember that the XLR artifacts need to be on a shared filesystem such as NFS.


This location refers to an NFS mount-point. You will need to create this location on your both XLR nodes & then mount this filesystem pointing to your NFS server like below.

mount -t nfs /home/shashank/nfs-share/

As you know, is IP address of NFS server.


NFS Server Configuration : -

Below is the output of /etc/exports file from our NFS server. As you can see, this directory has been exported to both of our XLR nodes.

With everything correctly configured, you can see HAProxy GUI by pointing your browser to "localhost:1936". Credentials are stats/stats. You can change these settings in /etc/haproxy.cfg file. This file is also attached. Below is the screenshot of HAProxy GUI. You can see that Node1 is up (Even when both the nodes are up & running, HAProxy will only see the active one as up. Other node will be seen as up when Node2 is down).


Below is the XLR log that shows the cluster in action : -

2016-12-05 06:43:48.693 [] {, akkaSource=akka.cluster.Cluster(akka://xlr_cluster), sourceActorSystem=xlr_cluster, akkaTimestamp=05:43:48.692UTC} INFO  a.c.Cluster(akka://xlr_cluster) - Cluster Node [akka.tcp://xlr_cluster@] - Node [akka.tcp://xlr_cluster@] is JOINING, roles

2016-12-05 06:43:49.458 [] {, akkaSource=akka.cluster.Cluster(akka://xlr_cluster), sourceActorSystem=xlr_cluster, akkaTimestamp=05:43:49.458UTC} INFO  a.c.Cluster(akka://xlr_cluster) - Cluster Node [akka.tcp://xlr_cluster@] - Leader is moving node [akka.tcp://xlr_cluster@] to [Up]
2016-12-05 06:43:49.464 [] {, akkaTimestamp=05:43:49.464UTC, akkaSource=akka.tcp://xlr_cluster@$a, sourceActorSystem=xlr_cluster} INFO  c.x.x.a.c.h.HotStandbyDetector - Active -- Cluster member Member(address = akka.tcp://xlr_cluster@, status = Up) joined

I created a new Release on Node 1 & it was visible on Node2 as well.


I now shutdown XLR on Node1 & HAProxy showed this node as down & Node2 as up.
I then created a new Release on Node2 & that Release was visible on Node1 after I brought it up. I then completed this Release on Node1.
Have more questions? Submit a request