Managing Load Balancers

Cloudpe Cloud offers load balancing as a service for the compute infrastructure. Load balancing ensures fault tolerance and improves performance of web applications by distributing incoming network traffic across virtual machines from a balancing pool. A load balancer receives and then routes incoming requests to a suitable VM based on a configured balancing algorithm and VM health.

Creating Load Balancers

Limitations:

  • The forwarding rule and protocol cannot be changed after the load balancer pool is added.
  • If an IPv6 subnet where a load balancer will operate works in the SLAAC or DHCPv6 stateless mode, the load balancer will receive an IPv6 address automatically.

Prerequisites:

  • A network where a load balancer will operate has IP management enabled.
  • All VMs that will be added in balancing pools have fixed IP addresses.

Creating Load Balancer with Balancing Pools

  1. On the Load balancers screen, click + Create load balancer.
  2. In the Create load balancer window, do the following:
    1. Specify a name and, optionally, a description.
    2. High availability means using two instances of load balancers in the active backup mode. If high availability is disabled, a single load balancer will be secured with the default platform high availability mode when a VM gets restarted on a new HW node in case of HW failure on the initial node.
  3. In the Network settings section, select the network in which your service’s VMs are stored.
    1. Select the Use a floating IP address checkbox if you need to expose the service to the public, and then choose to use an available floating IP address or create a new one.


      managing LB
  4. In the Balancing pools section, click Add to create a balancing pool to forward traffic from the load balancer to virtual machines. In the Create balancing pools window that opens, do the following:
    1. In the Forwarding rule section:
      1. Select the protocol which is your service networking protocol, such as HTTP/HTTPS, TCP, or UDP.
      2. Specify the LB port a front-facing port that you will use to connect from outside.
      3. Enter the back-end port, a service port on your virtual machines.
    2. In the Balancing settings section, select the balancing algorithm that determines how data flow will be balanced between the back-end virtual machines:
      • Source IP algorithm. It will guarantee that an external client (if its IP does not change) will be directed to the same back-end host.
      • Round-robin. It will direct each packet or session (for session-level protocols) to different back-end hosts.
    3. Turn on the Sticky session toggle to balance the session’s level protocols, such as HTTP/HTTPS, to send the packets of the same session to the same back-end host.





  5. Click Create.


Managing Balancing Pools

To see a list of balancing pools in a load balancer, click its name.

You can open the pool right pane to monitor its performance and health on the Overview tab, see its parameters on the Properties tab, and manage its members on the Members tab.

Limitations:

  • The forwarding rule and protocol cannot be changed after the load balancer pool is added.

Prerequisites:

  • All VMs that will be added in balancing pools have fixed IP addresses.

Add Another Balancing Pool to the Load Balancer

  1. Click the load balancer name, and then click Create balancing pool.
  2. In the Forwarding rule section, select a forwarding rule from the load balancer to the backend protocol, and then specify the ports for incoming and destination connections. Note the following:

    • With the HTTPS -> HTTPS rule, all virtual machines need to have the same SSL certificate (or a certificate chain).With the HTTPS -> HTTP rule, you need to upload an SSL certificate (or a certificate chain) in the PEM format and a private key in the PEM format.




  3. In the Balancing settings section, select the balancing algorithm:

    • Least connections. Requests will be forwarded to the VM with the least number of active connections.Round robin. All VMs will receive requests in a round-robin manner.Source IP. Requests from a unique source IP address will be directed to the same VM.
    Enable/disable the Sticky session option to enable/disable session persistence. The load balancer will generate a cookie that will be inserted into each response. The cookie will be used to send future requests to the same VM. This option is not available in the SSL passthrough mode.


  4. In the Members section, add members, that is, virtual machines, to the balancing pool by clicking Add. Each VM can be included in multiple balancing pools. In the Add members window that opens, select the desired VMs, and then click Add. You can select only between VMs that are connected to the chosen network.
  5. In the Health Monitor section, select the protocol that will be used for monitoring member’s availability: HTTP/HTTPS. The HTTP/HTTPS method GET will be used to check for the response status code 200. Additionally, specify the URL path to the health monitor.TCP/UDP. The health monitor will check the TCP/UDP connection on the backend port.PING. The health monitor will check members’ IP addresses.




    By default, the health monitor removes a member from a balancing pool if it fails three consecutive health checks at five-second intervals. When a member returns to operation and responds successfully to three consecutive health checks, it is added to the pool again. You can manually set the health monitor parameters, such as the interval after which VM health is checked, the time after which the monitor times out, and healthy and unhealthy thresholds. To change the default parameters, click Edit parameters, enter the desired values, and then click Save.
  6. Click Create.

The newly added pool will appear in the list of balancing pools.

Editing Balancing Pool

  • To edit the balancing settings such as the balancing algorithm and session persistence, click the ellipsis icon next to a pool, and then click Edit.
  • To edit the health monitor parameters, click the ellipsis icon next to a pool, and then click Edit health monitor.

Adding More Mmbers to Balancing Pool

  1. Click the ellipsis icon next to the required balancing pool, and then click + Add members.
  2. In the Add members window, select virtual machines to be added to the balancing pool, and then click Add.

Removing Balancing Pool

  1. Click the ellipsis icon next to the required balancing pool, and then click Delete.
  2. Click Delete in the confirmation window.

Monitoring Load Balancers

 Monitoring Performance and Health of Load Balancer

Open the Overview tab on the load balancer right pane.

The following charts are available:

Members state
The total number of members in the balancing pools grouped by status: “Healthy,” “Unhealthy,” “Error,” and “Disabled”.

CPU/RAM
CPU and RAM usage by the load balancer.

Network
Incoming and outgoing network traffic.

Active connections
The number of active connections.

Error requests
The number of error requests.


Modifying and Deleting Load Balancers

Editing the Name or Description of Load Balancer

  1. On the Load balancers screen, click a load balancer you want to edit.
  2. On the load balancer right pane, click Edit.
  3. In the Edit load balancer window, modify the name or description, and then click Save.

Disabling or Enabling Load Balancer

  1. On the Load balancers screen, click a load balancer you want to change.
  2. On the load balancer right pane, click Disable or Enable, depending on the load balancer’s current state.

Removing Load Balancer

  1. On the Load balancers screen, click a load balancer to delete.
  2. On the load balancer right pane, click Delete.
  3. Click Delete in the confirmation window.
Was this article helpful?

Related Articles