Set Up and Use Load Balancing

Load Balancing Overview-Admin and User Tasks

To set up and use the load balancer service:

  1. First, an admin user must do the setup tasks described in the next section Manage the Load Balancing Service.

  2. Then, end users can create and work with load balancers.

Manage the Load Balancing Service

Note

You must be an admin user to do the tasks described in this section and its sub-sections.

Zadara Cloud Services load balancing automatically distributes incoming application traffic across multiple instances. By sharing an application’s processing work among multiple instances like this:

  • More work gets done in the same amount of time.

  • You can achieve fault tolerance  and high availability.

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.

Functionality is exposed in the GUI under Menu > Load Balancing. In the CLI, the functionality is in the symp lbaas commands.

Required administrator tasks

Before a user can create and use a load balancer, an administrator must enable and initialize the load balancing service.

Enabling load balancing services

To Enable the load balancing services:

  1. Click Region Management > Settings > Services.

  2. Click the Load Balancing button to toggle from OFF to ON.

Initializing load balancing services

To Initialize the load balancing services:

  1. Click Menu > Load Balancing > Load Balancers.

  2. Note the initialize message box and click Initialize. If you do not see this message, the load balancing service has already been initialized.

What’s next?

Users can now create load balancers and direct application traffic to them.

Use the Load Balancing Service

Load Balancing Usage Overview

Zadara Cloud Services load balancing automatically distributes incoming application traffic across multiple instances. By sharing an application’s processing work among multiple instances like this:

  • More work gets done in the same amount of time.

  • You can achieve fault tolerance  and high availability.

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.

What’s next?

Creating 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. Click Menu > Load Balancing > Target Groups > Create. The Create Target Group window is displayed.

  2. In the Create Target Group window, specify these values, then click OK.

  3. Click Add to add an additional target.

Field

Description

Details

Name

Name of the target group you are creating.

Protocol

The protocol that the load balancer uses to access the target group. Choose either TCP or HTTP.

Port

The port on the target group that the load balancer should use to connect to the target group.

Details - Health Check

Path

HTTP only. The ping path the load balancer uses to do a health check on the instances in the target group.

This is the to the application that will be using the load balancer – for example, the path to your website’s home page in the format:

http://www.example.com/myApp

Interval

The interval, in seconds, between health checks of an individual instance.

Min: 5

Max: 300

Timeout

The amount of time, in seconds, during which no response means a failed health check.

This value must be less than the Interval value.

Min: 2

Max: 60

Healthy threshold

The number of consecutive health checks successes required before moving the instance to the Healthy state.

Min: 2

Max: 10

Unhealthy threshold

The number of consecutive health check failures required before moving the instance to the Unhealthy state.

Min: 2

Max: 10

Details - Session

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

How long (in seconds) the load balancer should consistently route the user’s request to the same instance.

Targets

Add

Click Add to add an additional target. For each target you add, specify target type, VM name or IP, and port.

Target type (left hand drop down menu)

Target type can be:

Instance

IP

You can specify the instances that you want in the target group by either VM name or IP. These instances can be compute instances or database instances.

You can mix and match target types, meaning that you can create a target group where some instances are of type Instance and some are of type IP.

VM name or IP (middle drop down menu)

Instance type = Instance

Select a target VM from the instance names that appear in the drop down menu.

Instance type = IP

Specify an IP that is in a valid range for your NeoKarm region.

Must be routable from the load balancer’s security group

This IP must routable from the network/security group combination you associate with the load balancer.

Port

Specify which port on the instance that the load balancer should communicate with.

Creating Load Balancers

To create a load balancer:

  1. Click Menu > Load Balancing > Load Balancer > Create. The Create Load Balancer window is displayed.

  2. In the Create Load Balancer window, specify these values, then click Finish:

Details

Name

Name of the load balancer you are creating.

Network

Select the internal network to use with the instance.

Floating IP

Optional. Select the floating IP to use with the instance.

Security Groups

Optional. Select the security groups to use with the instance.

Instance Type

An instance type specifies the CPUs, RAM, and boot disk size to use for the instance. Select an instance type from the drop down menu.

High Availability

Check to enable high availability for the load balancer. Two instances of a load balancer provide the necessary redundancy.

Listeners

Listeners

Target group: 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.

Select a target group from the drop down menu. (If you need to create a target group on the fly here, click Create Target Group.)

Protocol: Select either HTTP, HTTPS, or TCP.

If you select HTTPS, you also need to specify the SSL certificate that you want to use to enable secure communication between the outside consumer and the load balancer (SSL termination). If you have not already imported the SSL certificate click Menu > Account Management > Certificates > Import.

Port: specify the port on the load balancer that applications should send their requests to.

Protected resources

When you create a load balancer instance, the system creates a number of internal resources (including a VM) to support that load balancer instance. These are considered “protected resources.” To preserve the integrity of the load balancer instance, the system prevents you from deleting or modifying the protected internal VM that the system creates for the load balancer instance, with the following exceptions:

In the UI:

  • If you are logged in as an admin user, the internal VM appears in the list of VMs in the system (Menu > Compute > Instances). The only action that an admin user can perform on that VM is to force delete it (Menu > Compute > Instances > select the protected VM > More > Force Delete).

  • If you are logged in as a non-admin user, the internal VM does not appear in the list of VMs in the system, and you cannot perform any actions on that VM.

In the CLI:

  • For all users, protected VMs appear in the the list of all VMs in the system.

  • An admin user can force delete a protected VM by passing in the override_protection flag on the delete operation. Non-admin users cannot perform any actions on a protected VM.