Load Balancer
A load balancer is a networking service that distributes incoming network traffic across multiple virtual machines (VMs) within a virtual machine scale set. Its primary purpose is to improve the availability, scalability, and reliability of applications or services by evenly distributing the incoming traffic.
The load balancer acts as a traffic distribution point and helps ensure that each VM or instance within a scale set receives a balanced share of incoming requests. It intelligently routes the traffic based on various algorithms, or scripts that we defined. Such as the Odd-Even formula.
- Key Features:
- High Availability
It ensures that if one VM becomes unavailable or experiences a high load, the traffic is automatically routed to the remaining VMs.
- Scalability
It automatically adds or removes VMs or instances based on the load.
- Traffic Management
It defines session persistence settings to ensure that requests from the same client are consistently routed to the same VM.
- Availability Zones:
Load balancers in Azure can be configured with availability zones, which distribute the load balancer’s resources across multiple physical data centers, providing higher availability and resiliency.
- Network Security:
Load balancers offer built-in network security features. You can configure network security groups (NSGs) to control inbound and outbound traffic
- Azure provides various load-balancing services that you can use to distribute your workloads across multiple computing resources -
Application Gateway,
Front Door,
Load Balancer,
Traffic Manager.
Azure load balancing services can be categorized along two dimensions:
- Global versus Regional
- Global: Also known as Azure Front Door Service. It operates at the DNS level, enabling traffic distribution across multiple regions. Designed for globally scaled applications.
- Regional: Azure Load Balancer and Azure Application Gateway are considered regional. These services operate within a specific Azure region and distribute traffic across virtual machines or instances within that region. They are typically used for load-balancing TCP, UDP, and non-HTTP(S) traffic within a region.
- HTTP(S) versus non-HTTP(S)
- HTTP(S): Provides Layer 7 load balancing for HTTP and HTTPS traffic within a specific Azure region. It works with protocols such as TCP, UDP, and ICMP.
- non-HTTP(S): Layer 4 (TCP/UDP) load balancer that distributes traffic across virtual machines. It works with protocols such as TCP, UDP, and ICMP. Used for non-HTTP(S) services such as databases, VPN gateways, or custom protocols.
Azure load-balancing services
- Front Door: Modern cloud Content Delivery Network (CDN) that provides fast, reliable, and secure access between your users and your applications’ static and dynamic web content across the globe.
Why use Azure Front Door?
- Build and operate modern Internet-first architectures
- Accelerate and deliver your app and content globally
- Intelligently secure your digital estate
2. Traffic Manager: It is a DNS-based traffic load balancer that enables you to distribute traffic optimally to services across global Azure regions while providing high availability and responsiveness.
Traffic Manager is a DNS-based load-balancing service, it load balances only at the domain level. For that reason, it can’t fail over as quickly as Front Door,
Why use Traffic Manager?
- Increase application availability
- Increase application performance
3. Application Gateway: It provides an application delivery controller (ADC) as a service. It is a web traffic load balancer that enables you to manage traffic to your web applications. It operates at OSI layer 4 — TCP and UDP.
4. Load Balancer: It is a high-performance, ultra-low-latency Layer 4 load-balancing service (inbound and outbound) for all UDP and TCP protocols. Build to handle millions of requests per second.
A public load balancer can provide outbound connections for virtual machines (VMs) inside your virtual network.
An internal (or private) load balancer is used where private IPs are needed at the front end only.