Creating Application Load Balancer infrastructure through a wizard
Yandex Application Load Balancer is a cloud service terminating TLS connections and routing requests to backend applications. Application Load Balancer operates at Layer 7 of the OSI model
This guide will help you deploy the Application Load Balancer infrastructure and configure traffic routing to your test application backend.
Below, you can see how to create an infrastructure using a wizard. Alternatively, you can create its components one by one.
Getting started
- Log in to the management console
or sign up. If not signed up yet, navigate to the management console and follow the on-screen instructions. - On the Yandex Cloud Billing
page, make sure you have a linked billing account with theACTIVEorTRIAL_ACTIVEstatus. If you do not have a billing account yet, create one. - If you do not have a folder yet, create one. While creating a folder, you can also create a default virtual network with subnets in all availability zones.
Create a VM and set up a test web server on it
-
Create the
test-vm1VM from the Ubuntu 24.04 public image in theru-central1-aavailability zone. -
If you have the Yandex Cloud CLI installed, you can connect to your VM via OS Login:
yc compute ssh --name test-vm1 -
Start a test web server listening on port
8080:mkdir test-server; echo 'HELLO' > test-server/hello.txt; python3 -m http.server -d test-server 8080 -
Make sure your web server returns a list of subdirectories in the
test-serverdirectory. Open the terminal on your computer and run this command:curl --verbose <VM_public_IP_address>:8080
Create the Application Load Balancer infrastructure
- In the management console
, select the folder where you want to create a load balancer. - In the list of services, select Application Load Balancer.
- Click Create L7 load balancer and select Wizard.
Target group settings
The system will deploy your application backends on the target group VM. The load balancer will distribute requests to your application backend endpoints via the target group.
In our example, the target group will consist of a single VM.
- Specify the target group name:
test-target-group. - Select
test-vm1. - Do not change other settings. Click Create and continue.
Backend group settings
Backend groups contain traffic distribution rules and health check configurations for targets. The wizard will automatically create one backend and one health check group. It will also use the group you created earlier as the target group.
-
Specify the backend group name:
test-backend-group. -
To open backend and health check group settings, toggle Advanced settings on.
-
Specify the backend name:
backend-1. -
Specify the port:
8080. -
Configure health check settings:
- Interval:
3. - Healthy threshold:
2. - Port:
8080.
- Interval:
-
Do not change the other settings. Click Create and continue.
HTTP router settings
HTTP routers implement rules for client-to-backend traffic and allow you to modify requests at the load balancer layer. The wizard will automatically create a virtual host and a routing rule. It will also use the group you created earlier as the backend group.
- Specify the router name:
test-http-router. - Toggle Advanced settings on.
- Under Virtual hosts, specify the following:
- Host name:
test-virtual-host. - Route name:
test-route.
- Host name:
- Do not change the other settings. Click Create and continue.
L7 load balancer settings
A load balancer distributes incoming requests across target group VMs according to the rules specified in the HTTP router. Load balancers use listeners to receive traffic. The wizard will create a listener automatically. It will also use your previously created router as the HTTP router in this configuration.
In the following example, we will deploy a load balancer and its backend node in the same subnet and availability zone.
-
Specify the load balancer name:
test-load-balancer. -
Under Network settings, select the network containing the subnet where you want to place your load balancer node.
-
Toggle Advanced settings on.
-
Under Allocation, select a subnet in your preferred availability zone and configure it to enable incoming traffic.
Remove other availability zones by clicking
in each zone’s row. -
Under Listeners, specify the listener name:
test-listener. -
Do not change the other settings. Click Create.
Test the load balancer
In the terminal, run this command:
curl --verbose <load_balancer_public_IP_address>:80
The response must return HTTP 200 with an HTML list of test VM web root subdirectories.
Next, you can expand your target group by adding more VMs, create additional application backends, and set up routes to their endpoints.
How to delete the resources you created
To stop paying for the resources you created, delete them in the following order: