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.
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:
Navigate to Home > Load Balancing > Target Groups. The list of currently defined target groups is displayed.
To create a new target group, click Create from the top toolbar. The Create Target Group dialogue will open.
In the Details tab, enter the following:
Name - name of target group to be created.
Description - description of target group to be created.
Protocol - protocol used by load balancer to access the target group. Select TCP or HTTP.
Default Port - target group port used by load balancer to connect to group.
Health Check Path - used for HTTP only. Ping path used by load balancer to do health check on VM instances in the target group.
Health Interval - interval in seconds between health checks of an individual VM instance. Minimum - 5 sec. Maximum - 300 sec.
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.
Health Threshold - number of consecutive health checks successes required before moving a VM instance to the healthy state. Minimum - 2 sec. Maximum - 10 seconds.
Unhealthy Threshold - number of consecutive health checks failures required before moving a VM instance to the failed state. Minimum - 2 sec. Maximum - 10 seconds.
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.
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.
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:
Instance - select VM instance from the drop-down list.
IP - select IP address in your region and that is reachable from load balancer.
For either target type, enter Port indicating the target instance port with which the load balancer should communicate.
To create a load balancer:
Navigate to Home > Load Balancing > Load Balancers. The list of currently defined load balancers is displayed.
To create a new load balancer, click Create from the top toolbar.
In the Create Load Balancer dialogue which opens, enter the following:
Name - name of load balancer to be created.
Description - description of load balancer to be created.
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.
VPC - from drop-down list, select VPC to be associated with load balancer.
Subnet - from drop-down list, select existing subnet to be associated with load balancer, or click + to define new subnet.
Elastic IP - from drop-down list, select existing elastic IP to be associated with load balancer, or click + to define new IP.
Security Group - from drop-down list, select existing security group to be associated with load balancer, or click + to define new group.
Instance Type - from drop-down list, select instance type (CPU, RAM, boot disk size) to be associated with load balancer.
High Availability - check/uncheck high availability option. When selected, high availability will create additional load balancer which will automatically replace a failed load balancer.
Tags - enter tags which can be used for identifying and filtering the load balancer.
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.