Contents
Introduction
evQueue supports high availability clustering. In a clustered environment, all nodes are active and share the same configuration. Node use notifications to reload when configuration changes are made.
To achieve a truly high available cluster, you will also need a clustered database like MariaDB with galera cluster.
Setting up the nodes
First, you will need to install at least 2 standalone nodes. See installation, from source or from package. evQueue can support any number of nodes. You can have a look at the cluster sample configuration files.
Let's say that you have 2 nodes, named node1 and node2. Node1's IP address is 10.0.0.1 and node2's is 10.0.0.2.
On node1
Edit the configuration file and set the node name properly:
Also set the cluster description:
For notifications to work, you'll need to specify a valid user with admin rights:
Configure nodes to listen on external IP:
On node2
Replicate the configuration, just change the node name:
On both nodes
Restart evQueue engine:
On the web board
Edit the configuration file located in conf/cluster.json under the document root. Set the cluster descriptor:
{ "local#bbbbbb": [ "ws://10.0.0.1:5001", "ws://10.0.0.2:5001" ] }
That's it, you have your cluster configured!
Accessing the cluster from PHP
We provide a PHP class to seamlessly access an evQueue cluster. Please have a look at the evQueueCluster PHP class in the sample project.