Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

GUAC_LB

The GUAC 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 GUAC load balancing, be sure to listen on port 5671 and balance the request at 443 on both the GUAC_PRIMARY and GUAC_SECONDARY servers.

The following load balancing configuration was performed on CentOS7.x VM with HAProxy for the GUAC VM.

  1. SSH into the VM instance using the key pair that you used to launch the VM.
  2. Install HAProxy as the root user.

    Code Block
    yum install -y haproxy
    
  3. Modify HAProxy config file as below

    Code Block
    vi /etc/haproxy/haproxy.cfg
    
    #configuration to listen on 443 and loadbalance
    frontend gua-in
        mode tcp
        log global
        bind *:443
        default_backend guas
    backend guas
       mode tcp
       balance roundrobin
       option ssl-hello-chk
       server amqp1 <AMQP_PRIMARY>:443 check
       server amqp2 <AMQP_SECONDARY>:443 check backup
     
    #configuration to listen on 7788 and loadbalance
    frontend gua-wrk-in
        mode tcp
        log global
        bind *:7788
        default_backend gua-wrk
    backend gua-wrk
       mode tcp
       balance roundrobin
       server amqp1 <AMQP_PRIMARY>:7788 check
       server amqp2 <AMQP_SECONDARY>:7788 check backup
     
    #configuration to listen on 7789 and loadbalance
    frontend gua-rev-in
        mode tcp
        log global
        bind *:7789
        default_backend gua-rev
    backend gua-rev
       mode tcp
       balance roundrobin
       server amqp1 <AMQP_PRIMARY>:7789 check
       server amqp2 <AMQP_SECONDARY>:7789 check backup
    
  4. To bind to 443 port you must disable SELinux – run the following command to disable SELinux.

    Code Block
    setenforce 0
    sed -i 's/=enforcing/=permissive/g' /etc/selinux/config*
    #This command ensures that SELINUX is disabled permanently and the changes are retained even in case of reboot 


  5. Start the HAProxy service and check the status, it should be active


    Code Block
    systemctl start haproxy
    systemctl status haproxy 
    
Terms & Conditions Privacy Statement Cookies Trademarks