SAA-C03 Question 90
Single answerA company hosts a web application on Amazon EC2 instances behind an Application Load Balancer (ALB) across multiple Availability Zones. The application is stateful and requires session persistence for users. The company wants to improve the resilience of the architecture without redesigning the application. What should the company do?
- A
Enable sticky sessions on the Application Load Balancer.
- B
Use Amazon RDS with Multi-AZ deployment for session persistence.
- C
Deploy a Redis cluster on Amazon ElastiCache to store session data.
- D
Configure Auto Scaling with a minimum instance count across multiple Availability Zones.
Show answer and explanation
Correct answer: A
Explanation
To improve the resilience of the architecture without redesigning the application, enabling sticky sessions (session affinity) on the Application Load Balancer ensures that user requests are consistently routed to the same EC2 instance, preserving session data and avoiding disruptions during failover. This solution aligns with the requirement to maintain session persistence while enhancing resilience.
- A. Correct.
Enabling sticky sessions on the Application Load Balancer ensures that user requests are directed to the same EC2 instance, maintaining session persistence. This solution enhances resilience by avoiding session loss during failover to other EC2 instances.
- B. Incorrect.
Amazon RDS with Multi-AZ improves database availability but is not directly related to session persistence in a stateful application hosted on EC2 instances.
- C. Incorrect.
Using Amazon ElastiCache for session data would require application changes to integrate with Redis, which contradicts the requirement to avoid redesigning the application.
- D. Incorrect.
Configuring Auto Scaling improves scalability but does not address the session persistence requirement or enhance resilience for a stateful application.