A load balancer is a highly available, fully-managed instance that distributes workload across multiple virtual servers. It ensures the scaling of your applications while maintaining continuous availability, even during heavy traffic. By balancing the traffic load, it enhances the performance and reliability of websites, applications, databases, and other services. The load balancer monitors the health of virtual servers and directs traffic only to those that are functioning properly. Additionally, it supports various algorithms for traffic distribution, such as round-robin, least connections, and IP hash, and enhances security by hiding the internal server structure from external users. This redundancy and distribution ensure consistent application performance and reliability in the cloud.
IaaS Cloud users or administrators can create load balancing rules to distribute traffic received at a public IP to one or more instances. To achieve this, a user creates a rule, specifies an algorithm, and assigns the rule to a set of instances. Follow these steps to set up load balancing:
1. Navigate to Network → Public IP addresses on the left navigation bar.
2. Select a specific IP address from the list view.
3. Choose Load balancing in the right management block:
4. Specify the following parameters:
5. Finally, click on the Add VMs button, select one or more instance from the list and click OK to apply the load balancing rule.
To change and edit existing load balancer rules, follow these steps:
1. Navigate to Network → Public IP addresses on the left navigation bar.
2. Select a specific IP address from the list view.
3. Choose Load balancing in the right management block:
4. Select a load balancing rule from the list view and click on the Edit button:
5. Adjust the settings as desired and click OK to save the changes.
Sticky session policies ensure that a user's session data is consistently available across multiple requests in web-based applications, maintaining session state or stickiness. Any load balancer rule can have a stickiness policy, which includes a name, method, and parameters. The stickiness could be based on the following three methods:
To set up a sticky session policy, follow these steps:
1. Navigate to Network → Public IP addresses on the left navigation bar.
2. Select a specific IP address from the list view.
3. Choose Load balancing in the right management block:
4. Select a load balancing rule from the list view and click on the Configure button:
5. Depending on the method selected from the above options, you'll need to configure the following settings:
6. Click on OK to save the sticky session policy.
To delete existing load balancer rules, follow these steps:
1. Navigate to Network → Public IP addresses on the left navigation bar.
2. Select a specific IP address from the list view.
3. Choose Load balancing in the right management block:
4. Select a load balancing rule from the list view and click on the Delete button:
5. Click on Yes to confirm the process and delete the load balancer rule.