{"id":3528,"date":"2026-10-08T11:48:48","date_gmt":"2026-10-08T11:48:48","guid":{"rendered":"https:\/\/www.examtopics.info\/blog\/microsoft-az-104-azure-load-balancer-vs-application-gateway\/"},"modified":"2026-11-04T19:55:18","modified_gmt":"2026-11-04T19:55:18","slug":"microsoft-az-104-azure-load-balancer-vs-application-gateway","status":"publish","type":"post","link":"https:\/\/www.examtopics.info\/blog\/microsoft-az-104-azure-load-balancer-vs-application-gateway\/","title":{"rendered":"Microsoft AZ-104: Load Balancer vs. Application Gateway"},"content":{"rendered":"<p>Azure Load Balancer and Azure Application Gateway both distribute traffic, but they solve different networking problems. The fastest way to choose between them is to stop thinking in terms of \u201cwhich load balancer is better\u201d and ask which layer of the connection needs to make the decision. Azure Load Balancer works at Layer 4 with TCP and UDP flows. Application Gateway works at Layer 7 and understands HTTP and HTTPS application traffic. That architectural difference determines nearly every feature that follows.<\/p>\n<p>The choice matters during operations as much as deployment. A TCP service that does not speak HTTP cannot use web-specific path routing, while a customer website with multiple URL-based backends may need header inspection and TLS termination that a Layer 4 distributor cannot provide. Start with a packet-level description of the client connection, then identify the required decision: transport forwarding, web request routing, application firewall inspection or some combination. A wrong selection can leave necessary behavior unavailable or introduce unnecessary reverse-proxy complexity.<\/p>\n<h2>Layer 4 and Layer 7 describe different decision points<\/h2>\n<p>Azure Load Balancer makes forwarding decisions from transport-level information such as source and destination IP addresses, ports, and protocol. It does not need to understand the HTTP request path, host header, cookie, or application session. That makes it suitable for TCP and UDP services, internal application tiers, virtual appliances, and workloads where the transport connection itself is the unit being distributed.<\/p>\n<p>Application Gateway is an HTTP-aware reverse proxy. Because it terminates or processes Layer 7 web traffic, it can route requests according to URL paths, host names, headers, and other application characteristics. It can also integrate with Web Application Firewall, perform TLS termination, redirect traffic, rewrite headers and URLs, and support web-specific behavior such as cookie-based session affinity.<\/p>\n<p><a href=\"https:\/\/www.examtopics.info\/blog\/cloud-load-balancing-explained-step-by-step-improve-performance-and-scalability\/\">Cloud load balancing<\/a> distributes requests across healthy backends, but the decision point matters. When the requirement is to forward TCP 443 to an available VM, a Layer 4 service may be enough. When the requirement is to send <code>\/api<\/code> to one pool, <code>\/images<\/code> to another, terminate TLS and inspect HTTP requests with WAF rules, the architecture needs an HTTP-aware gateway. Start with the protocol and routing requirement rather than a preference for a product name.<\/p>\n<p>The difference also affects observability. A Layer 4 service can expose connection and health information but does not inherently know that one URL path is returning HTTP 500 while another is healthy. A Layer 7 gateway can reason about web requests and backend HTTP behavior. When operations teams define service-level monitoring, they should align the probe and telemetry layer with the failure they actually need to detect.<\/p>\n<h2>Azure Load Balancer is the simpler choice for TCP and UDP flows<\/h2>\n<p>Standard Load Balancer exposes a frontend IP configuration, a backend pool, health probes, and load-balancing rules. Incoming flows that match a rule are distributed to healthy backend instances. The service is pass-through at Layer 4, which keeps latency low and preserves a model that is familiar to network engineers working with non-HTTP protocols.<\/p>\n<p>Public Load Balancer is used when the frontend must be internet reachable. Internal Load Balancer uses a private frontend address inside a virtual network. Both can distribute traffic to virtual machines or virtual machine scale sets, and Standard Load Balancer supports <a href=\"https:\/\/www.examtopics.info\/blog\/az-104-availability-zones-vmss\/\">availability-zone scenarios<\/a>. Health probes decide which instances should receive new flows, so probe design is part of availability rather than a small configuration detail.<\/p>\n<p>Microsoft retired Basic Load Balancer on September 30, 2025. Existing instances can continue operating for a time, but the retired SKU is unsupported and lacks SLA coverage; it should not anchor a new production design. When migrating, inspect health probes, inbound and outbound rules, frontend addresses, availability requirements and application dependencies instead of replacing an old diagram label with \u201cStandard.\u201d Validate the same traffic paths from actual clients after the migration.<\/p>\n<p>High-availability ports are another Load Balancer capability for scenarios where a network virtual appliance must receive traffic across many ports. That pattern is very different from a web listener on Application Gateway. It reinforces the idea that Load Balancer is often infrastructure plumbing: it distributes flows without requiring the administrator to model application URLs, certificates, or HTTP routing rules.<\/p>\n<h2>Application Gateway is built for HTTP-aware routing<\/h2>\n<p>Application Gateway v2 is the current generation of the service. The older v1 SKUs retired on April 28, 2026. A v2 gateway is deployed into a dedicated subnet and acts as an application-layer traffic manager for web workloads. It supports host-based and path-based routing, TLS termination, autoscaling, zone redundancy, HTTP\/2, WebSocket traffic, and integration with Azure Web Application Firewall.<\/p>\n<p>Those features matter when the backend architecture has meaning above the port number. A single HTTPS listener might serve multiple sites by host name. Requests to <code>\/orders<\/code> could be routed to one backend pool while <code>\/static<\/code> goes elsewhere. TLS can terminate at the gateway, or end-to-end TLS can be maintained to the backend when the security model requires it. These are decisions a Layer 4 balancer cannot make because it does not parse the HTTP request.<\/p>\n<p>Application Gateway is an HTTP-aware managed reverse proxy: it can evaluate host and path rules, terminate TLS and apply supported web application firewall policies. Those capabilities differ from the transport forwarding of Azure Load Balancer. If the application needs to route database traffic, URL-path inspection is irrelevant; if it needs to route two websites by hostname behind one frontend, transport-layer distribution alone cannot express that rule. The decision should emerge from the request characteristics, backend health model and operational responsibility, not an analogy to a separate appliance vendor.<\/p>\n<p>Because the gateway is a proxy rather than pure pass-through, capacity and connection behavior must be planned at the gateway itself. Autoscaling reduces manual instance management, but subnet size, backend timeouts, connection draining, listener limits, and health configuration still matter. A team moving from a hardware ADC should translate those operational assumptions into managed-service settings instead of assuming Azure removes every sizing or lifecycle concern.<\/p>\n<h2>Health probes mean different things at each layer<\/h2>\n<p>Both services depend on health information, but the probe should reflect what \u201chealthy\u201d means for the layer being balanced. Load Balancer supports TCP, HTTP, and HTTPS probes depending on configuration. Its job is to decide whether a backend instance should receive new transport flows. If the probe fails, new connections stop being directed to the unhealthy instance.<\/p>\n<p>Application Gateway health probes can evaluate the HTTP behavior of a backend application. That makes it possible to check a specific path and expected web response rather than simply confirming that a port accepts a connection. For an application where the process is listening but a dependency is broken, an application-level probe can detect a failure that a basic TCP check would miss.<\/p>\n<p>The best probe endpoint is deliberately lightweight and meaningful. It should confirm the minimum dependencies necessary to serve traffic without creating heavy database work or calling every downstream service. A probe that is too shallow produces false health; a probe that is too deep can mark every frontend unhealthy because one optional dependency is slow. Probe design is part of application resilience.<\/p>\n<p>Probe dependencies should also be isolated from the user path. If the health endpoint calls a third-party API, a brief external outage can remove every backend from rotation even though the application could still serve most requests. Design the probe to answer whether the instance is safe to receive traffic, not whether every optional dependency in the business process is perfect at that moment.<\/p>\n<h2>TLS, WAF, and request routing push the design toward Application Gateway<\/h2>\n<p>If the requirement includes Web Application Firewall, Application Gateway is the natural choice because WAF inspects HTTP(S) traffic and applies managed or custom rules at the application layer. The gateway can terminate TLS, inspect the request, make a routing decision, and then forward to the selected backend. That is fundamentally different from a Layer 4 service that forwards a transport flow.<\/p>\n<p>TLS termination also changes certificate management. Certificates and listener configuration become gateway dependencies, and teams must decide whether traffic to the backend remains encrypted. End-to-end TLS can preserve encryption beyond the gateway, while offloading can simplify backend servers. The correct decision depends on compliance, threat model, and operational responsibility.<\/p>\n<p>Application-aware filtering should still be part of a larger security model. WAF reduces web-layer risk but does not replace secure application code, identity controls, network segmentation, or patching. General <a href=\"https:\/\/www.examtopics.info\/blog\/application-security-best-practices-10-ways-to-secure-your-apps\/\">application security practices<\/a> remain relevant behind the gateway. A routing component cannot compensate for an application that trusts unsafe input or exposes excessive privileges.<\/p>\n<h2>Network architecture and subnet requirements affect placement<\/h2>\n<p>Standard Load Balancer integrates directly with backend pools of supported Azure compute resources and can be public or internal. Application Gateway is a dedicated resource inside a virtual network and requires its own subnet. That dedicated-subnet requirement should be planned early because subnet sizing, network security, routing, DNS, and future scale all depend on the network topology.<\/p>\n<p>For a hub-and-spoke design, the choice of service placement should follow traffic flow. An internal Load Balancer can distribute east-west traffic to a private application tier. An Application Gateway can front HTTP workloads that require centralized Layer 7 policy. The two services can also appear in the same architecture because they are not mutually exclusive; one may handle application ingress while another balances a lower-level internal tier.<\/p>\n<p>For a hybrid application, test how a request reaches the front end and what happens after backend failure. A Layer 4 health probe can establish transport reachability without proving an authenticated web request succeeds. An Application Gateway health probe can exercise an HTTP path, but its success still depends on correct host, TLS and backend configuration. Write the expected probe result and escalation route before using one gateway&#8217;s green health state as evidence of end-to-end application availability.<\/p>\n<p>Application Gateway subnet planning must leave room for scale and service operations. Placing unrelated resources in the gateway subnet is not supported, and an undersized subnet can become a migration problem later. The network plan should therefore reserve address space before deployment rather than treating the gateway as just another IP-consuming resource added to an already crowded application subnet.<\/p>\n<h2>Choose based on the protocol and the policy you must enforce<\/h2>\n<p>A practical decision starts with protocol. If the service is UDP, Application Gateway is not the answer. If the service needs raw TCP pass-through, low latency, or transport-level balancing across VMs, Standard Load Balancer is usually the right starting point. If the service is HTTP(S) and needs host or path routing, TLS offload, WAF, or web-specific session behavior, Application Gateway deserves consideration.<\/p>\n<p>Then evaluate where security policy must be applied. WAF needs Layer 7 visibility. Network virtual appliances may need traffic chaining at a different layer. Backend requirements may call for source-address behavior that influences architecture. Cost and operational complexity matter too: an Application Gateway is a richer proxy and should not be deployed merely because it has more features.<\/p>\n<p>One practical design record can settle competing proposals. State the client protocol, whether host or path routing is necessary, where TLS ends, which web threats need inspection, what constitutes healthy backend behavior, and whether the service must survive a zone failure. Choose the component that meets those requirements with the fewest unnecessary layers. Separately, note that Microsoft retired Application Gateway V1 on April 28, 2026; a legacy V1 diagram is a migration problem, not an option for a fresh supported deployment.<\/p>\n<p>Also decide where client IP information is needed. Proxy-style Layer 7 services and pass-through Layer 4 services expose source information differently, which can affect application logging, allow lists, and troubleshooting. If a backend must make decisions from the original client address, validate the supported preservation or forwarding mechanism before choosing the service. This requirement is easy to discover late, after security logs or rate-limiting logic stop seeing the addresses the application expected.<\/p>\n<h2>Common design mistakes come from mixing the two mental models<\/h2>\n<p>One common mistake is expecting Load Balancer to route by URL because it can probe HTTP endpoints. A health probe does not turn a Layer 4 load balancer into an HTTP reverse proxy. Another is choosing Application Gateway for a protocol it does not understand simply because the workload is internet-facing. Internet exposure and OSI layer are separate questions.<\/p>\n<p>Teams also underestimate the consequences of legacy architecture. Basic Load Balancer is retired, and Application Gateway v1 is retired. A design copied from an old environment might therefore be operationally invalid even if the conceptual diagram still looks correct. Service generation and migration status must be part of current-state review.<\/p>\n<p>Finally, avoid treating the gateway or load balancer as the entire availability design. Backend instances need independent failure domains, probes need meaningful endpoints, DNS must point to the intended frontend, and dependencies must be resilient. Load distribution only helps when the backends and surrounding network are designed to survive failure.<\/p>\n<p>Another mistake is inserting both services into the same path without a reason. There are valid architectures that use Application Gateway and Load Balancer together, but each hop should solve a distinct requirement. Extra balancing layers increase troubleshooting points, health-probe interactions, and cost. If the design document cannot explain what policy or protocol boundary each component owns, the path is probably more complex than necessary.<\/p>\n<h2>A clear traffic narrative makes the service choice obvious<\/h2>\n<p>Write the architecture as a traffic story. A client connects to a specific frontend. The service evaluates the connection at Layer 4 or Layer 7. A health model determines eligible backends. The request or flow reaches a backend through a defined subnet and route. Security controls are applied at explicit points. If the story requires inspecting the HTTP request, Application Gateway belongs in it. If it only requires distributing TCP or UDP flows, Load Balancer may be sufficient.<\/p>\n<p>This narrative is more durable than memorizing a feature matrix. It explains why each component exists and makes troubleshooting easier. When traffic fails, the operator can test DNS, frontend configuration, listener or rule, health probe, backend reachability, and application behavior in order instead of guessing.<\/p>\n<p>Azure provides several global and regional traffic services, but the Load Balancer versus Application Gateway decision becomes straightforward when the layer is clear. Choose Layer 4 for transport-level distribution. Choose Layer 7 when the application request itself must influence routing or security. Then design the network, probes, and backend topology around that decision.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Choose Standard Azure Load Balancer or Application Gateway according to TCP\/UDP versus HTTP(S), TLS, health probes, WAF and network placement.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,1],"tags":[],"class_list":["post-3528","post","type-post","status-publish","format-standard","hentry","category-cloud-computing","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/posts\/3528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/comments?post=3528"}],"version-history":[{"count":6,"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/posts\/3528\/revisions"}],"predecessor-version":[{"id":6332,"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/posts\/3528\/revisions\/6332"}],"wp:attachment":[{"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/media?parent=3528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/categories?post=3528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/tags?post=3528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}