DVA-C02 Troubleshooting and Optimization Practice Question
A developer deploys an application on EC2 instances behind an Application Load Balancer (ALB). The application uses sticky sessions (session affinity) based on a cookie. Users report that they are intermittently logged out during their session. What is the MOST likely cause?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The stickiness cookie expiration duration is set too low, causing the cookie to expire before the user's session ends.
If the stickiness cookie expiration duration is set too low, the cookie will expire before the user's session ends, causing the load balancer to route the user to a different instance and losing session state. Option A is wrong because deregistration delay affects how long an instance remains in service during scaling events, but does not directly cause intermittent logouts during a session. Option B is wrong because a short health check interval might cause healthy instances to be marked unhealthy, but this would result in dropped connections, not specifically intermittent logouts due to session stickiness. Option C is wrong because cross-zone load balancing affects traffic distribution across zones, not session stickiness.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The deregistration delay value is too low, causing connections to be dropped during scaling events.
Why it's wrong here
The deregistration delay controls how long the ALB waits for in-flight requests to complete on a target before fully removing it from the target group during deregistration or scaling events, which affects graceful connection draining, not whether a session cookie stays valid or continues routing a user to the same instance.
- ✗
The ALB health check interval is too short, causing healthy instances to be marked unhealthy frequently.
Why it's wrong here
Health check frequency determines how often the ALB probes target health and can cause a genuinely struggling instance to be marked unhealthy and pulled from rotation, but it does not touch, expire, or remove the AWSALB stickiness cookie itself, so it does not directly explain intermittent logout symptoms tied to session persistence.
- ✗
Cross-zone load balancing is disabled, causing uneven traffic distribution.
Why it's wrong here
Cross-zone load balancing changes whether traffic is distributed evenly across all registered targets in every Availability Zone versus only within the zone the request arrived in, which affects load distribution balance across instances, not the lifetime or validity of the sticky session cookie a specific user's browser holds.
- ✓
The stickiness cookie expiration duration is set too low, causing the cookie to expire before the user's session ends.
Why this is correct
The ALB's stickiness configuration includes a cookie duration setting (1 second to 7 days) that determines how long the AWSALB cookie remains valid; if this duration is shorter than a typical user session, the cookie expires mid-session, the ALB then routes the next request to a different, possibly unauthenticated, backend instance, and the application-level session appears to log the user out.
Go deeper
Related to this question
About these practice questions
This DVA-C02 question is part of Courseiva's 1,135-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.