Course menuDOP-C02

Exams / DOP-C02 / Study guide / Load balancers, target health and cross-zone

Load balancers, target health and cross-zone: DOP-C02 study notes and practice questions

What to know about Load balancers, target health and cross-zone for the DOP-C02 exam, from the Resilient Cloud Solutions domain (15% of the exam guide), then 1 free question to test it. Part of the DOP-C02 study guide.

Last verified against current AWS documentation ·How we write our questions

What to know for the exam

These questions ask why users hit failing targets, how fast unhealthy targets are removed, or which load balancer fits.

Types

Load balancer Layer Fits
Application (ALB) 7 (HTTP/HTTPS, gRPC) Path and host routing, Lambda targets, authentication with Cognito or OIDC, weighted target groups for blue/green
Network (NLB) 4 (TCP, UDP, TLS) Very high throughput, static IPs, PrivateLink, preserving client IP
Gateway (GWLB) 3 Inserting firewalls and inspection appliances

Health checks

  • Interval, timeout, healthy threshold and unhealthy threshold decide how fast a failing target stops getting requests.
  • Point the check at a path that reflects real health (such as /health that checks dependencies lightly).
  • Auto Scaling groups should use ELB health checks so instances failing the app check are replaced, not just ones failing EC2 status checks.

Graceful changes

  • Deregistration delay (connection draining) lets in-flight requests finish before a target is removed.
  • Slow start ramps traffic to new targets.
  • Lifecycle hooks plus deregistration let apps finish work before termination.

Distribution

  • Cross-zone load balancing: on by default for ALB; off by default for NLB and GWLB. Turning it on spreads traffic evenly across all targets whatever their AZ.
  • Stickiness (cookies) keeps users on one target; it can unbalance load.
  • Zonal shift and ARC can move traffic away from an impaired AZ.

Monitoring

HTTPCode_Target_5XX_Count, UnHealthyHostCount, TargetResponseTime and access logs in S3 help diagnose problems.

Common traps

  • EC2 status checks only in the Auto Scaling group, so broken apps stay in service.
  • A health check on / that passes while the app is broken.
  • Uneven AZ load on an NLB with cross-zone off.

Try the 1 practice question

An airline runs its booking API on instances in three Availability Zones, behind an Application Load Balancer. The target group's health check runs against a /health path every 30 seconds.

During a recent incident, one instance in one Availability Zone kept failing its checks, but the load balancer continued to send it requests for several minutes. Customers saw timeouts on about one request in ten during that period.

The team wants unhealthy targets to stop receiving requests within a short, predictable time, and wants requests that are already in progress on a deregistered target to finish.

Which change meets these requirements?

Choose one answer.

  1. A. Turn off the target group's stickiness and increase the number of instances in each Availability Zone, so that a single failing instance receives a smaller share of the requests.
  2. B. Increase the health check interval to 60 seconds and the healthy threshold to five, so that the load balancer only marks an instance healthy after it has been stable for several minutes.
  3. C. Replace the Application Load Balancer with a Network Load Balancer, which removes unhealthy targets from service immediately without any health check configuration.
  4. D. Set the health check interval to 10 seconds, the unhealthy threshold to two, and a deregistration delay so that in-flight requests can finish on a deregistered target.
Show the answer and explanation

Answer: D

Explanation

Application Load Balancer health checks determine how quickly a failing target stops receiving requests, based on the interval, timeout and unhealthy threshold. The deregistration delay lets in-flight requests finish when a target leaves the group. Stickiness, longer intervals and a different load balancer type do not fix the problem.

Study

Want more on Load balancers, target health and cross-zone? The 5 full-length practice sets have 7 more Load balancers, target health and cross-zone questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets

Study Load balancers, target health and cross-zone

More Resilient Cloud Solutions topics