The AMQP load balancing can be done through HAProxy, NGiNX, Apache2, or a cloud that is natively available to services, like AWS Elastic Load Balancer (ELB). To configure the load balancer service and ensure AMQP load balancing, be sure to listen on port 5671 and balance the request at 443 on both the AMQP_PRIMARY and AMQP_SECONDARY servers.
SeeAMQP Firewall Rules > AMQP_LB Ports for the complete list of ports that need to be open for your deployment.
If you configure a load balancer for any CloudCenter component, be aware that the firewalId is enabled by default and you must explicitly disable it to ensure that the CloudCenter component(s) can communicate with the load balancer. See Firewall Rules Overview for additional context.
The following load balancing configuration was performed on CentOS7.x VM with HAProxy for the AMQP VM.
- SSH into the VM instance using the key pair that you used to launch the VM.
Install HAProxy as the root user.
Modify HAProxy config file as displayed in the following code block.
To bind to 5671 port you must disable SELinux – run the following command to disable SELinux.
Start the HAProxy service and check the status, it should be active
Optionally, to view the HAProxy stats use the following configuration to access the HAProxy from a web browser. These stats allow you to view the status of the nodes from a web browser and allows admins to drain/stop nodes without accessing the VMs directly.
You have successfully configured the AMQP instance! Proceed to thesection.
- No labels