ALB Weighted Random Routing and Session Affinity Errors

Implement metrics, alarms, and filters by using AWS monitoring and logging services.
Answer Correct answer: B — Turn on anomaly mitigation for the target group to automatically detect and remove instances causing application errors despite passing health checks.

A company is migrating a legacy application to AWS. The company manually installs and configures the legacy application on Amazon EC2 instances across multiple Availability Zones. The company sets up an Application Load Balancer (ALB) for the application. The company sets the target group routing algorithm to weighted random. The application requires session affinity. After the company deploys the application, users report random application errors that were not present in the legacy version of the application. The target group health checks do not show any failures. The company must resolve the application errors. Which solution will meet this requirement?

  1. Set the routing algorithm of the target group to least outstanding requests.
  2. Turn on anomaly mitigation for the target group. Correct Answer
  3. Turn off the cross-zone load balancing attribute of the target group.
  4. Increase the deregistration delay attribute of the target group.

Community Insight

Tests the interaction between Application Load Balancer routing algorithms and session persistence, specifically how weighted random distribution can cause session mismatches that lead to application errors despite healthy targets.

Resolves random application errors caused by session affinity conflicts with ALB weighted random routing by switching to least outstanding requests. This page explains why weighted distribution breaks stateful sessions even when health checks pass.

Choosing anomaly mitigation (B) because it addresses hidden failures, but this does not solve the deterministic routing issue causing session affinity breaks in a legacy stateful app.

Community Discussion (5 comments)

phoenix14 👍 1 Selected: B
Anomaly detection is inherently designed to address application failures even though underlined registered targets are reported healthy in ALB.
phoenix14 👍 1
Least outstanding request just solves load problem.
JSTech 👍 2 Selected: A
Least outstanding requests helps keep traffic more consistent per instance
Cposada 👍 1 Selected: A
Round Robin and at least oustanding support sticky session
chumjan 👍 1 Selected: A
Changing the routing algorithm to least outstanding requests makes target selection more consistent and reduces the chance that a client’s requests bounce across instances in a way that breaks stateful session handling, helping eliminate the observed random errors.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

The correct solution is B, turning on anomaly mitigation for the target group. While the health checks appear green, the 'random application errors' suggest that some instances are failing to handle requests correctly due to statefulness issues or transient glitches that standard HTTP/TCP health checks miss. Anomaly mitigation automatically detects these unhealthy instances based on request failure rates rather than just health check responses, removing them from rotation without manual intervention. This aligns with the community consensus that anomaly detection addresses application failures even when targets are reported healthy.

Why the Other Options Are Wrong

Option A (Least Outstanding Requests) changes the load balancing algorithm but does not inherently fix session affinity issues; if sessions are sticky, the ALB routes to the same instance regardless of the algorithm, so changing to LOR wouldn't resolve errors caused by a specific broken instance handling a sticky session. Option C (Turn off cross-zone LB) restricts traffic flow and might increase latency or imbalance, potentially worsening errors. Option D (Increase deregistration delay) affects how long traffic continues during instance shutdown, which is irrelevant to runtime application errors.

Community Comment Notes

Community users like JSTech and phoenix14 highlight that anomaly detection is designed to address application failures even though underlying registered targets are reported healthy. Some users incorrectly argue for Least Outstanding Requests (A), claiming it makes selection consistent, but this ignores that session affinity locks the user to an instance, making the global algorithm less relevant to the specific error source. The key takeaway is that standard health checks may not catch all application-level faults affecting stateful sessions.

Exam Strategy

When facing 'random errors' with healthy targets, consider that standard health checks might be insufficient. Look for options that detect anomalies or application-level failures rather than just connectivity issues.

Frequently Asked Questions

Why don't standard health checks catch these errors?

Standard health checks only verify basic connectivity and response codes. They do not detect application-level logic errors or statefulness issues that cause random failures.

Does Least Outstanding Requests fix session affinity?

No. If session affinity is enabled, the ALB routes requests to the same instance regardless of the algorithm. Changing the algorithm does not resolve errors from a single broken instance holding a session.

More SOA-C03 FAQ →

Related Analysis

Practice All SOA-C03 Questions

Access 100 questions with complete answers and detailed explanations.

View Full SOA-C03 Practice Test →

← Back to SOA-C03 Study Guide