Exams / SAA-C03 / EC2 Auto Scaling / Question 3
SAA-C03 practice question: EC2 Auto Scaling (3 of 3)
Design Resilient Architectures A free question from our original SAA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.
A travel booking website runs on Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer. Login sessions and shopping baskets are held in each instance's memory. When the group scales in at night, or replaces an instance that fails its health checks, the customers on that instance are logged out and lose their baskets. Sessions must survive the removal of any instance without adding noticeable latency to each request. Which change meets these requirements?
Choose one answer.
- AA. Turn on duration-based sticky sessions on the target group, so that each customer is always routed to the same instance.
- BB. Increase the target group's deregistration delay, so that instances finish serving their customers before they are removed.
- CC. Move session and basket data into an Amazon ElastiCache cluster with replicas, and have the application read sessions from it.
- DD. Turn on instance scale-in protection for every instance in the group, so that Auto Scaling cannot terminate instances that hold sessions.
Show the answer and explanation
Answer: C
Explanation
The root cause is session state held on individual instances, which Auto Scaling must be free to remove. Storing sessions in a shared, fast store such as ElastiCache makes instances interchangeable. Sticky sessions, deregistration delay and scale-in protection all leave the session on the instance, so it is still lost when the instance goes.
Study
Keep practising
Answer questions with a score at the end, or practise just this topic with the explanation after each one. No sign-up needed.