Azure Load Balancer is a networking service in Azure that distributes incoming network traffic across multiple resources such as virtual machines, virtual machine scale sets, and availability sets. It operates at the transport layer (Layer 4) of the OSI model, which means it can distribute traffic based on IP address and port number.
Here are three examples of how you might use Azure Load Balancer:
- Distributing incoming web traffic to a set of web servers: You can use Azure Load Balancer to distribute incoming web traffic to a set of virtual machines running a web server. This ensures that incoming requests are distributed across all the servers, rather than all requests going to a single server.
- Load balancing SQL Server Always On Availability Groups: You can use Azure Load Balancer to balance the traffic between nodes in a SQL Server Always On Availability Group. This helps to distribute the load across the nodes and ensure that there is no single point of failure.
- Load balancing traffic to an application gateway: You can use Azure Load Balancer to distribute incoming traffic to an Azure Application Gateway. The Application Gateway provides features such as SSL termination and web application firewall protection, while the Load Balancer distributes traffic across multiple Application Gateway instances.
There are two types of Azure Load Balancer:
- Basic: This type of load balancer is designed for simple scenarios and supports a limited set of features. It is included in the cost of virtual machines and other resources.
- Standard: This type of load balancer supports a wide range of features, including inbound NAT rules, load balancing rules, and health probes. It is available in different SKUs (more on that in a moment) and requires an additional charge.
There are three SKUs of Azure Load Balancer Standard:
- Basic: This SKU supports up to 1,000 concurrent flows and is ideal for small workloads.
- Standard: This SKU supports up to 10,000 concurrent flows and is suitable for most workloads.
- High: This SKU supports up to 30,000 concurrent flows and is ideal for large workloads.
A backend pool is a collection of resources that the load balancer distributes incoming traffic to. For example, if you have a set of virtual machines running a web server, you would add them to a backend pool, and the load balancer would distribute incoming traffic across all the virtual machines in the pool.
A health probe is a mechanism used by the load balancer to determine if a resource in the backend pool is healthy and able to handle incoming traffic. The load balancer periodically sends a probe to each resource to check its availability. If a resource fails the health probe, the load balancer will stop sending traffic to it.
A load balancer rule specifies how the load balancer should distribute incoming traffic. For example, you might create a rule that distributes incoming traffic to a specific port on a specific set of virtual machines in the backend pool. The rule can also specify the type of protocol (TCP or UDP) to be used for the distribution.