Using a Load Balancer

In a multi-node environment, you can reduce the request load to any one server by uniformly distributing the requests using a load balancer. Although Metacloud does not support LBaaS (Load-Balancer-as-a-Service), you can build an image that functions as a load balancer. For HTTP-based applications, you need to build an image equipped with a load-balancing and proxying software. Software, such as HAProxy, can be used to create a load-balancing image. For detailed instructions about installing and using HAProxy on your VMs, see the HAProxy documentation.

You need to prepare the following resources to allow a load balancer to communicate with the instances:

  • Private network—Instances communicate using the private network.
  • Port and IP address—The load balancer must occupy a network port and be assigned an IP address from a subnet. This is the frontend listener IP address.
  • Security group—A security group must include a VRRP (Virtual Router Redundancy Protocol) rule to allow traffic between instances. The IP protocol value is 112.

Launch an instance based on the load-balancing image containing HAProxy or other load-balancing software. You need the load-balancing image, the private network for attaching the instance, and the security group for the communication between instances. See Launching an Instance from an Image.

Each instance connected to the network has a port with a MAC address and an IP address. This port needs the ability to communicate with the listener IP address. You can allow the port to pair a second IP address using the following:

$ openstack port set <INSTANCE_PORT_ID> --allowed-address ip-address=<LISTENER_IP_ADDRESS>

Use openstack port show <INSTANCE_PORT_ID> to verify the allowed_address_pairs field contains the listener IP address. Do this for every instance intended to communicate with the load balancer.


Cisco Metacloud does not provide support for third-party, load-balancing hardware or software.