Get started with an application load balancer

Put an application load balancer in front of an instance that serves HTTP, reach it at its own name, and delete it again.

Last updated 18 November 2026View as Markdown

This tutorial uses the application type, because it answers at a name of its own as soon as it is active, with no DNS record of yours. Replace web-lb with the name you want and de1 with your region.

Prerequisites

  • An instance in the same region with a public IPv4 address, serving HTTP on port 80. An application load balancer reaches an instance over its public address. (In an organization whose load balancers run on its own hosts, it reaches the instance at its site address instead, and no public address is needed.)
  • Permission for lb:CreateLoadBalancer, lb:AddService, lb:AddTarget, lb:DescribeLoadBalancers and, for the clean-up, lb:DeleteLoadBalancer.
  • In the console, lb:DescribeLoadBalancers to open Load balancers (without it the page says you do not have permission to view load balancers), and ec2:DescribeInstances to pick the instance from a list.
  • Room in the lb.load-balancers quota of the region.

Step 1: Create the load balancer

Important

You pay for an application load balancer from the hour it is active until you delete it, at most €4.99 a month.

  1. Open Load balancers, then choose Create load balancer.
  2. For Name, enter web-lb.
  3. For Region, choose your region.
  4. For Type, choose the application entry.
  5. Choose Create.

The load balancer appears in the list with the status provisioning, and turns active once the fleet carries it.

Step 2: Add an HTTP service

The service listens on port 80 and forwards to port 80 on the target.

  1. Open the load balancer, then the Services tab.
  2. Choose Add service.
  3. Keep Protocol on HTTP, Source port on 80 and Destination port on 80.
  4. Choose Add.

Step 3: Add your instance as a target

  1. Open the Targets tab, then choose Add target.
  2. Keep Target type on Instance, and for Instance, pick your instance.
  3. Choose Add.

The target shows the status unknown until the fleet has checked it, then healthy.

Step 4: Send a request

On the Overview tab, under Names, copy the platform name, then request it:

curl -i http://web-lb-1a2b3c4d.lb.apps.example.com/

The answer comes from your instance. If the health check (a GET / on port 80) has taken the target out of rotation, the load balancer answers 503 instead. With the CLI, the name is the hostname field of dcloud lb load-balancers get lb-id.

Clean up

Deleting the load balancer removes its services and targets; the instance keeps running.

  1. Open the load balancer, then the Danger zone tab.
  2. Choose Delete load balancer.
  3. Type the load balancer's name, then choose Delete load balancer.

Next steps

Did this page help you?