Azure Load Balancing
Azure Load Balancer is a high-performance, low-latency Layer 4 load balancer that distributes inbound and outbound traffic. It can load balance traffic across multiple virtual machines and scale sets.
Key Concepts
- Load Balancing Rules: Define how incoming traffic is distributed to backend pools.
- Backend Pools: A collection of virtual machines or virtual machine scale sets that handle the traffic.
- Health Probes: Monitor the health of backend instances to ensure traffic is only sent to healthy servers.
- Load Balancing Algorithms: Azure Load Balancer uses a hash-based distribution algorithm.
- High Availability: Built-in redundancy for robust application availability.
Types of Load Balancers
Azure Load Balancer
A global, fully managed Layer 4 (TCP/UDP) load balancer. It provides high availability and scalability for your applications. It can be deployed as Standard or Basic SKU.
- Standard SKU: Offers advanced features like availability zones, outbound connectivity, and integration with other Azure services.
- Basic SKU: A more cost-effective option for simple load balancing scenarios.
Azure Application Gateway
A web traffic load balancer that enables you to manage traffic to your web applications. It offers Layer 7 (HTTP/HTTPS) load balancing capabilities, including cookie-based session affinity, URL-based content routing, and SSL termination.
Azure Front Door
A scalable and highly available cloud network service that provides global load balancing and dynamic website acceleration. It is designed for web applications and provides features like SSL offloading, cookie-based session affinity, and URL path-based routing.
Common Use Cases
- Distributing traffic across multiple web servers for high availability.
- Scaling applications by adding or removing backend instances.
- Enabling health checks to ensure traffic is only sent to healthy resources.
- Providing a single point of access for a distributed application.
- Improving application performance through global traffic distribution (with Front Door).
Getting Started
To configure Azure Load Balancer, you can use the Azure portal, Azure CLI, PowerShell, or ARM templates. Here's a basic example using the Azure CLI to create a Standard Load Balancer:
az network lb create \
--resource-group myResourceGroup \
--name myLoadBalancer \
--sku Standard \
--frontend-ip-name myFrontDoor \
--private-ip-address 10.0.0.5
For detailed configuration steps and advanced scenarios, please refer to the official Azure Load Balancer documentation.