{"id":1249,"date":"2025-05-20T07:23:23","date_gmt":"2025-05-20T07:23:23","guid":{"rendered":"https:\/\/www.examlabs.com\/certification\/?p=1249"},"modified":"2026-11-06T17:38:49","modified_gmt":"2026-11-06T17:38:49","slug":"how-aws-elastic-load-balancer-functions","status":"publish","type":"post","link":"https:\/\/www.examlabs.com\/certification\/how-aws-elastic-load-balancer-functions\/","title":{"rendered":"How AWS Elastic Load Balancer Functions"},"content":{"rendered":"<p>AWS Elastic Load Balancing (ELB) receives incoming traffic and distributes it among eligible application or network targets. It is a managed traffic-distribution service, not a guarantee that an application can never fail. A load balancer uses listeners, routing rules where supported, target groups, and health checks to decide where requests or connections should go. The application&#8217;s availability still depends on healthy targets, sufficient capacity, correct network permissions, and functioning data or service dependencies.<\/p>\n<p>The service has four load-balancer types: Application Load Balancer (ALB), Network Load Balancer (NLB), Gateway Load Balancer (GWLB), and the older Classic Load Balancer (CLB). They are not interchangeable. An ALB understands application-layer web requests; an NLB handles transport-layer connections; a GWLB helps insert virtual network appliances into traffic flows; and CLB is a previous-generation option for existing environments. AWS recommends considering current-generation types when migrating legacy Classic deployments rather than choosing CLB as the default for a new application.<\/p>\n<h2>Follow a request through the load balancer<\/h2>\n<p>Consider a customer opening a website. The client resolves a DNS name and connects to an internet-facing endpoint. The load balancer accepts the connection through a configured listener, evaluates any supported routing conditions, and selects a registered target from the relevant target group. That target might be an EC2 instance, an IP-addressed service, a supported container workload, or another target type allowed by the chosen load balancer. The application processes the request and returns a response through the appropriate path.<\/p>\n<p>On an Application Load Balancer, a listener may handle HTTP or HTTPS and apply rules based on host names, request paths, or supported HTTP attributes. One target group might serve an API while another handles an administrative interface. Target-group configuration identifies protocol, port, target type, and health checks. A listener rule must forward requests to the intended group; a healthy target in the wrong group will not fix a routing rule that sends requests elsewhere.<\/p>\n<p>The load balancer is deployed within a VPC networking context. Its scheme, enabled Availability Zones, subnet choices, routes, security groups where applicable, and target reachability determine whether traffic can traverse the intended path. The <a href=\"https:\/\/www.examlabs.com\/certification\/understanding-amazon-virtual-private-cloud-vpc\/\">Amazon VPC routing and security boundaries<\/a> need to be considered alongside the load-balancer configuration. An endpoint resolving in DNS does not prove that the client can reach the listener or that the target can receive the forwarded connection.<\/p>\n<h2>Choose Application, Network, or Gateway Load Balancing<\/h2>\n<p>An <strong>Application Load Balancer<\/strong> is commonly appropriate for web applications and HTTP APIs that need application-layer routing. It can route supported requests based on paths or host names, integrate with supported authentication patterns, and forward to target groups. Its ability to interpret a web request is the reason it fits an API or microservices entry point. A client using a non-HTTP protocol may need a different load-balancer model.<\/p>\n<p>A <strong>Network Load Balancer<\/strong> handles transport protocols such as TCP, UDP, and TLS with characteristics suited to high-throughput or low-latency connection processing. It may be selected when the application requires transport-layer behavior or supported static address capabilities. Unlike an ALB, it does not inspect URL paths to choose targets. A team that needs fixed network endpoints for a non-HTTP service should compare NLB features and limitations with the exact application protocol before deploying it.<\/p>\n<p>A <strong>Gateway Load Balancer<\/strong> serves a different architectural purpose: distributing traffic across compatible virtual appliances for security inspection or related network processing. It can form part of a route-based design that inserts firewalls or other appliances into a traffic path. This is not the normal choice for sharing web requests among application servers. The network routing, availability, and appliance health requirements deserve their own design and failure testing.<\/p>\n<p><strong>Classic Load Balancer<\/strong> remains relevant when operating an existing legacy deployment. AWS describes it as previous generation and provides tools to migrate to an ALB or NLB where appropriate. The migration creates a new load balancer; it does not convert the existing one in place. Compare required listener protocols, target behavior, policies, monitoring, and DNS cutover before committing to a migration. Do not assume every Classic setting is transferred automatically or that a new type provides exact feature parity.<\/p>\n<h2>Health checks are readiness signals, not full application tests<\/h2>\n<p>Load balancers use configured health checks to determine whether registered targets should receive traffic. An HTTP health check may request a selected path and evaluate the returned response; other types can test transport connectivity or use supported protocol behavior. The health configuration includes intervals, timeouts, thresholds, and a matching rule where appropriate. A successful check establishes only that its defined condition was met, not that the entire application, database, or customer workflow is healthy.<\/p>\n<p>For example, a target that responds to <code>\/health<\/code> with a static success message may still be unable to authenticate users or query its database. On the other hand, a health check that requires an unavailable optional downstream service may mark otherwise usable instances as unhealthy. Decide whether the check reflects the service&#8217;s true ability to handle requests and whether a dependency failure should remove the target from rotation. Test it with both a healthy and a deliberately degraded target in an authorized environment.<\/p>\n<p>When a target fails its check, the load balancer can stop routing ordinary requests to it under normal supported conditions, but the result also depends on the load-balancer type, group state, and availability of other targets. Do not promise zero errors during every failure or imply that a load balancer replaces application-level retries and recovery. Investigate the reason code and target state when all endpoints become unhealthy, rather than repeatedly modifying health thresholds to force a green status.<\/p>\n<h2>Understand Availability Zones, capacity, and Auto Scaling<\/h2>\n<p>Configuring a load balancer across appropriate Availability Zones can help an application tolerate some zonal failures, but the application needs healthy capacity in those zones and supporting dependencies that can also survive. Cross-zone load-balancing behavior and configuration vary by type and target-group settings. Review the actual enabled zones and whether their targets are registered and healthy. A traffic distributor cannot create a healthy database or replace an unavailable identity service on its own.<\/p>\n<p>Elastic Load Balancing and EC2 Auto Scaling solve related but distinct problems. The load balancer distributes traffic among available targets, while an Auto Scaling group can adjust or replace compute capacity according to its configuration and scaling policies. The <a href=\"https:\/\/www.examlabs.com\/certification\/how-to-set-up-and-configure-amazon-ec2-auto-scaling-using-the-aws-management-console\/\">EC2 Auto Scaling capacity lifecycle<\/a> helps explain how new instances become registered, pass health checks, and start serving traffic. A new instance that boots but fails initialization should not be considered useful capacity merely because the Auto Scaling API succeeded.<\/p>\n<p>Capacity planning still matters. A load balancer can scale to accommodate many workloads, but the end-to-end request path may bottleneck at a database, external API, application worker pool, or shared storage resource. When traffic rises, inspect target response time, request failures, backend utilization, and downstream latency before changing instance size or count. Adding targets without locating the bottleneck can increase cost while leaving the customer experience unchanged.<\/p>\n<h2>Secure the listener and backend path<\/h2>\n<p>For an HTTPS application, a listener can terminate TLS using a supported certificate, often managed through AWS Certificate Manager. The <a href=\"https:\/\/www.examlabs.com\/certification\/how-to-provision-and-deploy-ssl-tls-certificates-with-aws-certificate-manager-acm\/\">AWS Certificate Manager and TLS deployment process<\/a> involves domain validation, certificate association, supported security policies, and renewal behavior. Terminating client TLS at the load balancer does not automatically mean the traffic between the load balancer and target is encrypted; backend protocol and target configuration must be reviewed separately.<\/p>\n<p>Restrict access on both sides of the path. The load-balancer listener should accept only intended traffic, and targets should generally be reachable through appropriate controls rather than being unnecessarily exposed to the public internet. Security-group behavior differs by load-balancer type, while network ACLs and route tables can affect reachability independently. A service may return an apparent application timeout when the actual cause is a blocked connection or an incorrect subnet route.<\/p>\n<p>Security also extends to identity and operations. Limit who can change listeners, rules, certificates, target groups, and logging settings. Use appropriate service identities for automation, review deployment changes, and monitor unexpected modifications. A load balancer can help with selected application traffic and integration controls, but it is not a substitute for application authentication, authorization, secure code, data protection, or web-layer defenses where those are required.<\/p>\n<h2>Monitor the right metric and locate the failed layer<\/h2>\n<p>AWS publishes metrics for the different load-balancer families, including request or connection volume, target health, latency, and errors where supported. The <a href=\"https:\/\/www.examlabs.com\/certification\/understanding-aws-cloudwatch-an-in-depth-overview\/\">CloudWatch monitoring and alarm model<\/a> is useful when an operator can explain the distinction between load-balancer-generated errors and failures returned by targets. A spike in unsuccessful responses could originate at the listener, target, application, or dependency. Metrics should direct investigation rather than become a dashboard whose green color is accepted without question.<\/p>\n<p>When a user reports an HTTP 503 or a connection failure, begin with the request path. Confirm DNS resolution and endpoint reachability, then the listener and rules, target group membership and health, subnet\/security controls, target process, and downstream dependencies. An Application Load Balancer access log may help reconstruct a request, while VPC Flow Logs can assist with transport reachability and CloudTrail can show certain configuration changes. Each evidence source answers a different question.<\/p>\n<p>The <a href=\"https:\/\/www.examlabs.com\/certification\/amazon-route-53-comprehensive-overview\/\">Amazon Route 53 naming and health-routing behavior<\/a> influences which load-balancer endpoint a client chooses. DNS caching and routing-policy conditions can cause different clients to observe a change at different times. A Route 53 health check may avoid an unhealthy endpoint under its configured conditions, but it does not resolve a database failure behind every available load balancer. Keep recovery procedures tied to the actual failure domain.<\/p>\n<p>Design a controlled troubleshooting exercise in a disposable environment: one target returns a bad health-check result, another is healthy, and a rule forwards to the expected group. Record the target health state, relevant metric changes, and user-visible behavior. Repair the specific condition and verify normal routing. This trains operators to distinguish target readiness from listener misconfiguration or a global networking problem without making multiple uncontrolled changes at once.<\/p>\n<h2>Plan deployments, migration, and cost with the traffic path in mind<\/h2>\n<p>A new application may use a load balancer from its first deployment, while an existing system may need a careful migration from Classic Load Balancer or a change in architecture. Use infrastructure-as-code and review the resulting listeners, rules, target groups, security policies, and enabled zones. When migrating, create and test the new load balancer, then manage DNS or traffic cutover deliberately. A rollback plan should account for connection behavior, cached DNS answers, and the state of the old targets during the transition.<\/p>\n<p>Blue\/green releases can use separate target groups or deployment environments to limit the exposure of a new application version when supported by the chosen approach. The <a href=\"https:\/\/www.examlabs.com\/certification\/blue-green-deployment-with-aws-auto-scaling-a-comprehensive-guide\/\">blue-green deployment and capacity strategy<\/a> should include traffic-shift criteria, application compatibility, health verification, and a decision about reverting to the previous version. Sending a small share of requests to the new version does not prove that all database migrations or long-running sessions can be rolled back safely.<\/p>\n<p>Load balancers add direct charges and can influence data-transfer or supporting infrastructure costs. AWS&#8217;s published pricing differs among load-balancer types and usage characteristics, so use the relevant service pricing page and actual traffic assumptions instead of a universal per-hour estimate. Evaluate target capacity, logging retention, TLS processing, connection patterns, and cross-zone behavior as appropriate. A more complicated architecture is not automatically more resilient or economical.<\/p>\n<p>Elastic Load Balancing works best as part of a complete service design: DNS leads clients to an appropriate entry point; listeners and rules route eligible traffic; health checks inform target selection; compute capacity and dependencies deliver responses; and monitoring shows when the path fails. Choose ALB, NLB, or GWLB for the protocol and operational requirement, treat Classic as a migration concern, and validate the whole path. That gives the application a maintainable traffic layer without mistaking a managed load balancer for a guarantee of uninterrupted service.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>AWS Elastic Load Balancing (ELB) receives incoming traffic and distributes it among eligible application or network targets. It is a managed traffic-distribution service, not a guarantee that an application can never fail. A load balancer uses listeners, routing rules where supported, target groups, and health checks to decide where requests or connections should go. The [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1648,1649],"tags":[89,597,592,640,596],"class_list":["post-1249","post","type-post","status-publish","format-standard","hentry","category-all-certifications","category-amazon","tag-aws","tag-balancer","tag-elastic","tag-functions","tag-load"],"_links":{"self":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts\/1249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/comments?post=1249"}],"version-history":[{"count":2,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts\/1249\/revisions"}],"predecessor-version":[{"id":29992,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts\/1249\/revisions\/29992"}],"wp:attachment":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/media?parent=1249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/categories?post=1249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/tags?post=1249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}