Public Cloud Load Balancer [New]

Public Cloud Load Balancer [New]

Create a Load Balancer


A Load Balancer distributes incoming traffic across multiple backend instances, improving the availability, scalability, and reliability of your applications.

This article explains how to create a Load Balancer, the required network configuration, and the available deployment options.

Prerequisites

Before creating a Load Balancer, ensure that:

  • You have an existing project.
  • You have created a Network.
  • The Network contains at least one Subnet.
  • Your instances are connected to the same Network

Note: A Load Balancer cannot be created without an existing subnet.

Network Requirements

  • A Load Balancer must be attached to a Subnet within a Network.
  • During the creation process, you will be asked to select an existing subnet.
  • The Load Balancer is created on the selected subnet and is used to route traffic to backend instances.
  • If you do not already have a network, complete the following steps first:
    • Create a Network.
    • Create a Subnet within the network.
    • Connect your backend instances to the subnet.

Public Connectivity

A Network by itself does not provide connectivity to the public Internet. If you want your application to be publicly accessible, the Network must be connected to a Router.

The router provides connectivity between your Network and the external network.

Without a Router, the Load Balancer is only reachable by resources connected to the same Network.

Create a Load Balancer

Launch wizard consists of the following configuration steps.

  1. Select a Region
    • Select the region where the Load Balancer will be deployed.
  2. Select an Availability Zone
    • Choose the Availability Zone where the Load Balancer will be deployed.
      • AZ-01
      • AZ-02
    • A Load Balancer can currently distribute traffic only to backend instances located in the same Availability Zone. For example, a Load Balancer deployed in AZ-01 can balance traffic only to instances running in AZ-01.
  3. Select an Instance Type
    • Choose the Load Balancer size that best matches your expected workload.
Instance TypevCPUsMemoryRecommended For
lsw.lb.small11 GiBDevelopment, testing, internal applications, and low-traffic workloads.
lsw.lb.medium22 GiBProduction applications, APIs, and medium-traffic services.
lsw.lb.large44 GiBHigh-traffic applications, enterprise workloads, and services requiring increased capacity.
  1. Add a Name for your load balancer instance
  2. Add a Description for your load balancer instance (optional)
  3. Select a Subnet
    • Select the subnet where the Load Balancer Virtual IP (VIP) will be created.
    • Only subnets within the selected Availability Zone are available for selection.
    • The selected subnet must be connected to the backend instances that will receive traffic.

Review and Create

Review the selected configuration:

  • Region
  • Availability Zone
  • Subnet
  • Instance Type

If everything is correct, click Create Load Balancer.

The Load Balancer will enter the Creating state while it is being provisioned.

Once provisioning is complete, the status changes to Active, indicating that the Load Balancer is ready to be configured.

Launch a Load Balancer with terminated HTTPS


Step 1. Add your certificate and private key as secrets.

  • In the Customer Portal, go to Public Cloud (new).
  • Open Settings, select your project and go to the Secrets tab.
  • Click Add Secret.
    • Select the secret type:
      • Certificate: for your TLS certificate.
      • Private Key: for the matching private key
  • Give the secret a name you’ll recognise, for example example-com-cert, and paste the PEM content.
    Repeat these steps for the other item, so that you end up with one certificate secret and one private key secret.

Step 2: Create a certificate container.

A container groups your certificate and private key so the load balancer can use them as a pair.

  • Still under Project Settings, open the Containers tab.
  • Click Create Container.
  • Enter a name for the container, for example example-com-tls.
  • Select your certificate from the Certificate dropdown
  • Select your private key from the Private Key dropdown.
  • Your container now appears in the list. Wait until its status is Active before you continue. The listener only accepts active certificate containers.

Step 3: Launch a Load Balancer

  • In Public Cloud (new), go to Load Balancers.
  • Click Launch Load Balancer.
  • Fill in the required details and confirm.
  • Wait until the load balancer is ready, then click it to open its detail page.

Step 4: Create an HTTPS listener

  • On the load balancer detail page, open the Listeners tab.
  • Click Create Listener.
  • Under Protocol, select TERMINATED_HTTPS.
  • A Certificate Container dropdown appears. Select the container you created in Step 2. The listener uses this container to get the TLS certificate and private key.
  • Fill in the other listener settings, such as the port (usually 443), and click Create.

To send traffic to your instances, open the Pools tab, create a pool, add your instances as members and link the pool to the listener.