SAP-C02 Continuous Improvement for Existing Solutions Practice Question
A company is running a stateful web application on EC2 instances behind an ALB. Users report that when they refresh a page, they are logged out. What is the best solution to fix this issue?
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
✓
Enable sticky sessions on the ALB.
Enabling sticky sessions (session affinity) on the ALB ensures that all requests from a user session are routed to the same EC2 instance, preventing logout on page refresh. Option A is incorrect because cross-zone load balancing distributes traffic across instances in multiple Availability Zones but does not affect session persistence. Option C is incorrect because replacing the ALB with a Classic Load Balancer does not provide a better solution; ALB also supports sticky sessions. Option D is incorrect because while ElastiCache can store session data externally, it does not address the routing issue; the root cause is that requests are going to different instances, so sticky sessions directly solve the problem.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Enable cross-zone load balancing on the ALB.
Why it's wrong here
Cross-zone load balancing distributes traffic evenly, not session persistence.
- ✓
Enable sticky sessions on the ALB.
Why this is correct
Sticky sessions route user to the same instance.
- ✗
Replace the ALB with a Classic Load Balancer.
Why it's wrong here
Classic Load Balancer also needs stickiness.
- ✗
Use ElastiCache to store session data.
Why it's wrong here
This would require application changes.
Go deeper
Related to this question
About these practice questions
One of 1,660 original SAP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SAP-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 SAP-C02 exam.