ALB Weighted Random Routing and Session Affinity Errors
Short answer
B Turn on anomaly mitigation for the target group to automatically detect and remove instances causing application errors despite passing health checks.
Question
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?
Key Takeaways
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.
Common mistake: 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.
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?
Does Least Outstanding Requests fix session affinity?
Discussion 5 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 5
-
JSTech 👍 2 Answered ALeast outstanding requests helps keep traffic more consistent per instance
-
chumjan 👍 1 Answered AChanging 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.
-
phoenix14 👍 1 Answered BAnomaly detection is inherently designed to address application failures even though underlined registered targets are reported healthy in ALB.
-
Cposada 👍 1 Answered ARound Robin and at least oustanding support sticky session
-
phoenix14 👍 1Least outstanding request just solves load problem.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SOA-C03 Questions
Access 100 questions with complete answers and detailed explanations.
View Full SOA-C03 Practice Test →