Contents

  1. Introduction
  2. Setting up the nodes
  3. Accessing the cluster from PHP

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.

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:

cluster.node.name = node1

Also set the cluster description:

cluster.nodes = tcp://10.0.0.1:5000,tcp://10.0.0.2:5000

For notifications to work, you'll need to specify a valid user with admin rights:

cluster.notify.user = notifyuser
cluster.notify.password = notifypassword

On node2

Replicate the configuration, just change the node name:

cluster.node.name = node2
cluster.nodes = tcp://10.0.0.1:5000,tcp://10.0.0.2:5000
cluster.notify.user = notifyuser
cluster.notify.password = notifypassword

On both nodes

Restart evQueue engine:

root@evqueue:~# service evqueue restart

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.