{"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-10-08T11:48:48","modified_gmt":"2026-10-08T11:48:48","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: Azure Load Balancer vs Application Gateway"},"content":{"rendered":"<h2>Microsoft AZ-104: Azure Load Balancer vs Application Gateway<\/h2>\n<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>This distinction matters for <a href=\"https:\/\/www.examtopics.info\/az-104\">AZ-104<\/a> because Azure administrators are expected to implement and manage virtual networking, but it also matters well beyond exam objectives. A wrong choice can force an application to terminate TLS in the wrong place, lose path-based routing, create unnecessary proxy overhead, or make a simple transport-level service far more complicated than it needs to be.<\/p>\n<h3>Layer 4 and Layer 7 describe different decision points<\/h3>\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 general explanation of <a href=\"https:\/\/www.examtopics.info\/blog\/cloud-load-balancing-explained-step-by-step-improve-performance-and-scalability\/\">cloud load balancing<\/a> helps frame the shared goal: both services spread traffic so a workload can scale and survive backend failures. The implementation layer is what separates them. When the requirement is \u201csend TCP 443 to a healthy VM,\u201d Load Balancer may be enough. When it is \u201csend \/api to one pool, \/images to another, enforce WAF rules, and terminate TLS,\u201d Application Gateway is designed for that job.<\/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<h3>Azure Load Balancer is the simpler choice for TCP and UDP flows<\/h3>\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 availability-zone scenarios. 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 in September 2025, so current designs should use Standard Load Balancer. That is a useful reminder that architecture should be based on the service generation that exists now, not screenshots from an old tutorial. Administrators following <a href=\"https:\/\/www.examtopics.info\/microsoft-exams\">Microsoft certification<\/a> material should also watch for retired SKUs and update older lab patterns accordingly.<\/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<h3>Application Gateway is built for HTTP-aware routing<\/h3>\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>The closest on-premises analogy is an application delivery controller. An article on the role of an <a href=\"https:\/\/www.examtopics.info\/blog\/understanding-f5-load-balancer-and-its-role-in-modern-it-infrastructure\/\">F5 load balancer<\/a> illustrates why enterprise teams often separate application-aware traffic management from basic network flow distribution. Azure Application Gateway provides that application-aware function as a managed Azure service rather than as a self-managed appliance.<\/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<h3>Health probes mean different things at each layer<\/h3>\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<h3>TLS, WAF, and request routing push the design toward Application Gateway<\/h3>\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<h3>Network architecture and subnet requirements affect placement<\/h3>\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>Administrators who work deeply with these decisions will encounter the broader networking scope represented by <a href=\"https:\/\/www.examtopics.info\/az-700\">AZ-700<\/a>. The key point is to design around traffic direction, protocol, inspection point, and failure domain rather than assuming that \u201cone load balancer per application\u201d is the architecture.<\/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<h3>Choose based on the protocol and the policy you must enforce<\/h3>\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>The design perspective in <a href=\"https:\/\/www.examtopics.info\/az-305\">AZ-305<\/a> is useful here because service selection is about matching capabilities to nonfunctional requirements. \u201cMore capable\u201d is not synonymous with \u201cbetter.\u201d The best service is the one that performs the required routing and protection while introducing the least unnecessary complexity.<\/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<h3>Common design mistakes come from mixing the two mental models<\/h3>\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<h3>A clear traffic narrative makes the service choice obvious<\/h3>\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>Microsoft AZ-104: Azure Load Balancer vs Application Gateway 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. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","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":0,"href":"https:\/\/www.examtopics.info\/blog\/wp-json\/wp\/v2\/posts\/3528\/revisions"}],"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}]}}