avatarAshish Patel

Summary

Azure Load Balancer operates at Layer 4 for TCP/UDP traffic distribution, while Azure Application Gateway functions at Layer 7, offering advanced features like URL-based routing, SSL termination, and a built-in Web Application Firewall (WAF).

Abstract

Azure Application Gateway is a sophisticated traffic manager designed for web applications, capable of routing decisions based on URL paths or host headers, and providing SSL termination. It includes a Web Application Firewall (WAF) to protect against common security threats and offers application delivery controller (ADC) functionalities. In contrast, Azure Load Balancer is a high-performance, low-latency service that distributes traffic at the network layer, supports outbound connections by translating private IPs to public IPs, and is suitable for load balancing any TCP/UDP traffic. Both services ensure high availability and can be used in hybrid scenarios, but they cater to different layers of the OSI model and have distinct feature sets tailored to specific use cases.

Opinions

  • The Azure Application Gateway is praised for its ability to optimize web farm productivity by offloading CPU-intensive SSL termination to the gateway.
  • The Azure Load Balancer is highlighted for its high performance and low latency, capable of handling millions of requests per second.
  • The Azure Application Gateway's WAF is seen as a critical feature for protecting web applications from common exploits and ensuring compliance with security standards.
  • The Azure Load Balancer's zone-redundant design is emphasized for providing high availability across Availability Zones.
  • The use of Application Gateway for end-to-end TLS/SSL encryption is noted as a solution for scenarios where unencrypted communication to servers is not

Azure — Difference between Azure Load Balancer and Application Gateway

Comparison: Azure Load Balancer vs Application Gateway in Azure.

TL;DR:

Azure Load Balancer works with traffic at Layer 4. Application Gateway works with Layer 7 traffic, and specifically with HTTP/S (including WebSockets).

Azure Application Gateway

Azure Application Gateway — Route Based Traffic

Application Gateway (AGW) is a web traffic manager for your web applications (one or multiple).

  1. With AGW, on top of load balancing your workloads, you can make routing decisions based on URI path or host headers. For example, you can route traffic based on the incoming URL. If /images are in the inbound URL, you can route traffic to a specific set of servers (or pool) configured for images. If /video is in the URL, that traffic is routed to another pool.
  2. It can be used to do TLS/SSL termination. TLS/SSL termination can be useful to allow unencrypted traffic between AGW and backend servers saving some of processing load needed to encrypt and decrypt said traffic. However, sometimes unencrypted communication to the servers is not acceptable because of security requirements, compliance requirements, or application may only accept a secure connection. In these situations, Application Gateway also supports end-to-end TLS/SSL encryption.
Azure Application Gateway — Backend Pools

3. It includes a web application firewall called Web application firewall (WAF) that protects your workload from common exploits like SQL injection attacks or cross-site scripting attacks, to name a few.

4. It provides application delivery controller (ADC) as a service, offering various Layer 7 load-balancing capabilities. Use it to optimize web farm productivity by offloading CPU-intensive SSL termination to the gateway.

Azure Load Balancer

Azure Load Balancer

Load balancing refers to evenly distributing load (incoming network traffic) across a group of backend resources or servers. Azure Load Balancer distributes inbound flows that arrive at the load balancer’s front end to backend pool instances. These flows are according to configured load balancing rules and health probes. The backend pool instances can be Azure Virtual Machines or instances in a virtual machine scale set.

  1. It can also provide outbound connections for virtual machines inside your virtual network by translating their private IP addresses to public IP addresses.
  2. It is a TCP/UDP load balancing and port forwarding engine only. It does not terminate, respond, or otherwise interact with the traffic. It simply routes traffic based on source IP address and port, to a destination IP address and port.
  3. Azure Load Balancer is a high-performance, low-latency Layer 4 load-balancing service (inbound and outbound) for all UDP and TCP protocols. It is built to handle millions of requests per second while ensuring your solution is highly available. It is zone-redundant, ensuring high availability across Availability Zones.
Azure Load Balancer

A public load balancer can provide outbound connections for virtual machines (VMs) inside your virtual network. These connections are accomplished by translating their private IP addresses to public IP addresses. Public Load Balancers are used to load balance internet traffic to your VMs.

An internal (or private) load balancer is used where private IPs are needed at the frontend only. Internal load balancers are used to load balance traffic inside a virtual network. A load balancer frontend can be accessed from an on-premises network in a hybrid scenario.

View more from Awesome Azure

Happy Clouding!!!

Azure
Load Balancer
Application Gateway
Load Balancing
Azure Application Gateway
Recommended from ReadMedium