Load Balancing

Overview

In case of high volume application traffic which must be distributed between multiple VM instances, Zadara Cloud Services supports the definition of load balancers and target groups. Load balancers distribute the load between the VM instances defined in the target group. This capability provides the following benefits when compared to working with individual VM instances:

  • Time required to complete a task is reduced.

  • Fault tolerance and high availability can be provided in case of VM instance failure.

When you create a load balancer, you define a target group of instances that will share the work of processing requests from an application. The application then directs its requests to the load balancer, and the load balancer distributes the work among the instances in the load balancer’s target group.

Before using load balancers, the capability must be globally enabled and configured by a system administrator.

Target Groups

A target group is a group of instances to which a load balancer directs application traffic. The instances in this group collectively do the processing work that the application requires.

To create a target group:

  1. Navigate to Home > Load Balancing > Target Groups. The list of currently defined target groups is displayed.

  2. To create a new target group, click Create from the top toolbar. The Create Target Group dialogue will open.

  3. In the Details tab, enter the following:

    1. Name - name of target group to be created.

    2. Description - description of target group to be created.

    3. Protocol - protocol used by load balancer to access the target group. Select TCP or HTTP.

    4. Default Port - target group port used by load balancer to connect to group.

    5. Health Check Path - used for HTTP only. Ping path used by load balancer to do health check on VM instances in the target group.

    6. Health Interval - interval in seconds between health checks of an individual VM instance. Minimum - 5 sec. Maximum - 300 sec.

    7. Health Timeout - time in seconds beyond which no response means a failed health check. Value must be less than the interval value. Minimum - 2 sec. Maximum - 60 seconds.

    8. Health Threshold - number of consecutive health checks successes required before moving a VM instance to the healthy state. Minimum - 2 sec. Maximum - 10 seconds.

    9. Unhealthy Threshold - number of consecutive health checks failures required before moving a VM instance to the failed state. Minimum - 2 sec. Maximum - 10 seconds.

    10. Sticky Session - By default, a load balancer routes each request independently to the registered target group instance with the smallest load. However, you can use the sticky session feature to bind a user’s session to a specific instance. This ensures that all requests from the user during the session are sent to the same instance.

    11. Duration - if sticky session is selected, enter session duration in seconds during which load balancer should consistently route the user’s request to the same VM instance.

  4. Click Next.

  5. In the Details tab, click Add to add targets to the group. You can add multiple targets and mix target types by clicking Add for each target. The following target types are available:

    1. Instance - select VM instance from the drop-down list.

    2. IP - select IP address in your region and that is reachable from load balancer.

  6. For either target type, enter Port indicating the target instance port with which the load balancer should communicate.

  7. Click Finish.

Load Balancer

To create a load balancer:

  1. Navigate to Home > Load Balancing > Load Balancers. The list of currently defined load balancers is displayed.

  2. To create a new load balancer, click Create from the top toolbar.

  3. In the Create Load Balancer dialogue which opens, enter the following:

    1. Name - name of load balancer to be created.

    2. Description - description of load balancer to be created.

    3. Type - the load balancer type determines the basis on which the load balancing is done. The following types are supported:

      • ALB - Application Load Balancer does distribution between targets based on HTTP/HTTPS sessions.

      • NLB - Network Load Balancer does distribution between targets based on TCP sessions regardless of the application layer protocol.

    4. VPC - from drop-down list, select VPC to be associated with load balancer.

    5. Subnet - from drop-down list, select existing subnet to be associated with load balancer, or click + to define new subnet.

    6. Elastic IP - from drop-down list, select existing elastic IP to be associated with load balancer, or click + to define new IP.

    7. Security Group - from drop-down list, select existing security group to be associated with load balancer, or click + to define new group.

    8. Instance Type - from drop-down list, select instance type (CPU, RAM, boot disk size) to be associated with load balancer.

    9. High Availability - check/uncheck high availability option. When selected, high availability will create additional load balancer which will automatically replace a failed load balancer.

    10. Tags - enter tags which can be used for identifying and filtering the load balancer.

  4. Click Finish.

Note

When you create a load balancer instance, the system creates a number of internal resources (including a VM). These are considered “protected resources.” To preserve the integrity of the load balancer instance, the system prevents you from deleting or modifying these resources.