[Yandex Cloud documentation](../index.md) > [Yandex Application Load Balancer](index.md) > Step-by-step guides > Creating Application Load Balancer infrastructure through a wizard

# 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](https://ru.wikipedia.org/wiki/OSI_model), supporting HTTP and HTTPS protocols.

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](concepts/index.md#alb-wizard). Alternatively, you can create its components [one by one](quickstart.md).

## Getting started {#before-begin}

1. Log in to the [management console](https://console.yandex.cloud) or sign up. If not signed up yet, navigate to the management console and follow the on-screen instructions.
1. On the [**Yandex Cloud Billing**](https://center.yandex.cloud/billing/accounts) page, make sure you have a linked [billing account](../billing/concepts/billing-account.md) with the `ACTIVE` or `TRIAL_ACTIVE` status. If you do not have a billing account yet, [create one](../billing/quickstart/index.md#create_billing_account).
1. If you do not have a folder yet, [create one](../resource-manager/operations/folder/create.md). 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-vm}

1. [Create](../compute/operations/vm-create/create-linux-vm.md) the `test-vm1` VM from the [Ubuntu 24.04](https://yandex.cloud/en/marketplace/products/yc/ubuntu-2404-lts-oslogin) public image in the `ru-central1-a` availability zone.
   
1. [Connect to your VM over SSH](../compute/operations/vm-connect/ssh.md).
   
    If you have the [Yandex Cloud CLI](../cli/quickstart.md) installed, you can connect to your VM via [OS Login](../compute/operations/vm-connect/os-login.md):

    ```bash
    yc compute ssh --name test-vm1
    ```
    

1. Start a test web server listening on port `8080`:

    ```bash
    mkdir test-server; echo 'HELLO' > test-server/hello.txt; python3 -m http.server -d test-server 8080
    ```

1. Make sure your web server returns a list of subdirectories in the `test-server` directory. Open the terminal on your computer and run this command:

    ```bash
    curl --verbose <VM_public_IP_address>:8080
    ```

## Create the Application Load Balancer infrastructure {#create-alb-infrastructure}

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select the [folder](../resource-manager/concepts/resources-hierarchy.md#folder) where you want to create a load balancer.
  1. Navigate to **Application Load Balancer**.
  1. Click **Create L7 load balancer** and select **Wizard**.

{% endlist %}

### Target group settings {#settings-target-group}

The system will deploy your application backends on the [target group](concepts/target-group.md) 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.

{% list tabs group=instructions %}

- Management console {#console}

  1. Specify the target group name: `test-target-group`.
  1. Select `test-vm1`.
  1. Do not change other settings. Click **Create and continue**.

{% endlist %}

### Backend group settings {#settings-backend-group}

[Backend groups](concepts/backend-group.md) 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.

{% list tabs group=instructions %}

- Management console {#console}

  1. Specify the backend group name: `test-backend-group`.
   
  1. To open backend and health check group settings, toggle **Advanced settings** on.

  1. Specify the backend name: `backend-1`.

  1. Specify the port: `8080`.

  1. Configure health check settings:
      1. **Interval**: `3`.
      1. **Healthy threshold**: `2`.
      1. **Port**: `8080`.
  
  1. Do not change the other settings. Click **Create and continue**.

{% endlist %}

### HTTP router settings {#settings-http-router}

[HTTP routers](concepts/http-router.md) 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.

{% list tabs group=instructions %}

- Management console {#console}

  1. Specify the router name: `test-http-router`.
  1. Toggle **Advanced settings** on.
  1. Under **Virtual hosts**, specify the following:
     1. Host name: `test-virtual-host`.
     1. Route name: `test-route`.
  1. Do not change the other settings. Click **Create and continue**.

{% endlist %}

### L7 load balancer settings {#create-load-balancer}

A [load balancer](concepts/application-load-balancer.md) distributes incoming requests across target group VMs according to the rules specified in the HTTP router. Load balancers use [listeners](concepts/application-load-balancer.md#listener) 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.

{% list tabs group=instructions %}

- Management console {#console}

  1. Specify the load balancer name: `test-load-balancer`.
  1. Under **Network settings**, select the network containing the subnet where you want to place your load balancer node.
  1. Toggle **Advanced settings** on.
  1. Under **Allocation**, select a subnet in your preferred [availability zone](../overview/concepts/geo-scope.md) and configure it to enable incoming traffic.

      Remove other availability zones by clicking ![xmark](../_assets/console-icons/xmark.svg) in each zone’s row.

  1. Under **Listeners**, specify the listener name: `test-listener`.
   
  1. Do not change the other settings. Click **Create**.

{% endlist %}

## Test the load balancer {#test}

In the terminal, run this command:

```bash
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 {#clear-out}

To stop paying for the resources you created, delete them in the following order:

{% list tabs group=instructions %}

- Management console {#console}

  1. [Delete](operations/application-load-balancer-delete.md) the `test-load-balancer` L7 load balancer.
  1. [Delete](operations/http-router-delete.md) the `test-http-router` HTTP router.
  1. [Delete](operations/backend-group-delete.md) the `test-backend-group` backend group.
  1. [Delete](operations/target-group-delete.md) the `test-target-group` target group.

{% endlist %}