Question #1409
A company operates a social media application on Amazon EC2 instances within an Auto Scaling group behind an Application Load Balancer (ALB). User data is stored in an Amazon RDS for PostgreSQL Multi-AZ database. The company needs to manage user session data efficiently and ensure durability during peak loads. Which solutions meet these requirements? (Choose two.)
Store session information in an Amazon RDS for MySQL instance.
Implement AWS Amplify to handle user session data.
Enable sticky sessions (session affinity) on the ALB.
Deploy an Amazon ElastiCache for Redis cluster to store session data.
Use AWS Config to track and manage session states.
Explanation
The correct answers are A and D.
Why A (Sticky Sessions) is correct: Enabling sticky sessions on the ALB ensures user requests are routed to the same EC2 instance, improving efficiency by reducing the need to share session data across instances. While sticky sessions alone don't ensure durability, they complement centralized storage solutions like ElastiCache.
Why D (ElastiCache) is correct: ElastiCache for Redis provides an in-memory, low-latency data store for session data. It ensures durability through replication and persistence, making it ideal for handling peak loads and instance failures.
Why others are incorrect:
- B: Using RDS MySQL adds unnecessary complexity and is less efficient than ElastiCache for session data.
- C: AWS Amplify is designed for frontend development, not session management.
- E: AWS Config tracks resource configurations, not session states.
Key Points:
- Sticky sessions improve efficiency by routing traffic to the same instance.
- ElastiCache offers fast, scalable, and durable session storage.
- Avoid relational databases (RDS) for session data due to higher latency.
Answer
The correct answer is: {A,D}