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
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.
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:
Replicate the configuration, just change the node name:
On both nodes
Restart evQueue engine:
On the web board
Edit the configuration file. Depending on your configuration, it's located in /etc/evqueue/conf/queueing.php (for packaged version) or under the document root, in includes/conf/queueing.php. Set the cluster descriptor:
$QUEUEING = [ 'tcp://10.0.0.1:5000', 'tcp://10.0.0.2:5000' ];
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.