[Yandex Cloud documentation](../index.md) > [Yandex Network Load Balancer](index.md) > Getting started

# Getting started with Network Load Balancer

[Network load balancers](concepts/index.md) evenly distribute traffic evenly across cloud resources and monitor their health status. This enhances the availability and fault tolerance of your apps and cloud network infrastructure.

Create a network load balancer with a [listener](concepts/listener.md), attach a [target group](concepts/target-resources.md), and set up [health checks](concepts/health-check.md) using Network Load Balancer.

## Getting started {#before-you-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).
1. [Create](../compute/quickstart/quick-create-linux.md) multiple VMs in advance to include them in the target group attached to your network load balancer. For testing, consider using low-cost [preemptible VMs](../compute/concepts/preemptible-vm.md).

## Create a target group {#create-target-group}

A [target group](concepts/target-resources.md) consists of cloud resources that receive traffic from the network load balancer. 

To create a target group:

1. In the [management console](https://console.yandex.cloud), select the folder where you want to create a target group.
1. Navigate to **Network Load Balancer**.
1. In the left-hand panel, select ![image](../_assets/console-icons/target.svg) **Target groups**.
1. Click **Create a target group**.
1. Enter `test-target-group` as the target group name.
1. Select the VMs to add to the target group.
1. Click **Create**.


## Create a network load balancer {#create-load-balancer}

When creating a network load balancer, you need to set up a listener to handle incoming traffic and configure health checks for the targets in the attached target group.

To create a network load balancer:
  
1. In the [management console](https://console.yandex.cloud), select the folder where you need to create a load balancer.
1. Navigate to **Network Load Balancer**.
1. Click **Create a network load balancer**.
1. Name the load balancer, e.g., `test-load-balancer`.
1. In the **Public address** field, select the IP address assignment method:

   * **Auto**: To assign a random IP address from the Yandex Cloud IP address pool.
   * **List**: To select a public IP address from the list of previously reserved static IP addresses. For more information, see [Converting a dynamic public IP address to static](../vpc/operations/set-static-ip.md).

1. Under **Listeners**, click **Add listener**.
1. In the window that opens, specify these listener settings:
  
   * **Name**.
   * **Port** (ranging from `1` to `32767`) on which the load balancer will listen to incoming traffic.
   * **Target port** (ranging from `1` to `32767`) to which the load balancer will direct traffic.

1. Click **Add**.
1. Under **Target groups**, click **Add target group**.
1. Select a target group or [create a new one](operations/target-group-create.md):
  
   * Click **Create target group**.
   * Enter a name for the target group. Follow these naming requirements:

     * Length: between 3 and 63 characters.
     * It can only contain lowercase Latin letters, numbers, and hyphens.
     * It must start with a letter and cannot end with a hyphen.
  
   * Select the VMs to add to the target group.
   * Click **Create**.

1. Optionally, under **Health check**, click **Configure** and in the window that opens:
  
   * Enter a name for the health check. Follow these naming requirements:

     * Length: between 3 and 63 characters.
     * It can only contain lowercase Latin letters, numbers, and hyphens.
     * It must start with a letter and cannot end with a hyphen.
  
   * Select either `HTTP` or `TCP` for the check type.
   * If you selected HTTP, specify the URL for health checks in the **Path** field.
   * Specify a port number between `1` and `32767`.
   * Specify the response timeout in seconds.
   * Specify the interval in seconds for sending health check requests.
   * Specify the healthy threshold, i.e., the number of successful checks required to consider the VM ready to receive traffic.
   * Specify the unhealthy threshold, i.e., the number of failed checks before traffic is no longer routed to the VM.
   * Click **Apply**.
  
1. Click **Create**.


## Check the resource status {#health-check}

To check the [status of the network load balancer](concepts/index.md#lb-statuses) and targets in the attached target group:

1. In the [management console](https://console.yandex.cloud), select the folder where you need to create a load balancer.
1. Navigate to **Network Load Balancer**.
1. In the list, find the load balancer you created.
1. Make sure the load balancer's status is `Active`, which means it is ready to distribute traffic across the targets.
1. Click the load balancer name.
1. Check **Target groups**. If the VMs are running and ready to receive traffic, their status must be `HEALTHY`.
1. Open the Compute Cloud page and [stop](../compute/operations/vm-control/vm-stop-and-start.md#stop) one of the VMs in the target group.
1. Go back to the load balancer page and make sure the stopped VM's status is now `UNHEALTHY`. This means the target in the group failed the health check and is not ready to receive traffic.


## Delete the load balancer and the resources you created {#delete-resources}

If you no longer need the load balancer, [delete it](operations/load-balancer-delete.md).

Then, [delete the target group](operations/target-group-delete.md) and [VMs](../compute/operations/vm-control/vm-delete.md).


## What's next {#what-is-next}

* Learn more about how network load balancers work [here](concepts/index.md).
* See our [best practices](concepts/best-practices.md) for deploying a network load balancer.