AWS Certified Solutions Architect Professional SAP-C02 Practice Question
A financial services company is running a critical legacy application on a single, large Amazon EC2 instance in a single Availability Zone (AZ). The application is stateful and stores user session data in-memory on the instance. The company needs to improve the application's reliability to withstand both an individual instance failure and a complete AZ failure. A key constraint is that the application's source code cannot be significantly re-architected; only configuration changes are feasible. Which strategy should a solutions architect recommend to provide the highest availability and resiliency with the least amount of application code modification?
Deploy a Network Load Balancer in front of an EC2 Auto Scaling group that spans multiple AZs. Enable sticky sessions on the target group to ensure users are consistently routed to the same instance.
Place two EC2 instances in different AZs. Use AWS Global Accelerator to direct traffic to a primary instance and configure a Route 53 health check to fail over to the secondary instance if the primary becomes unhealthy.
Deploy an Application Load Balancer in front of an EC2 Auto Scaling group configured to use multiple AZs. Deploy a multi-AZ Amazon ElastiCache for Redis cluster and modify the application's configuration to use it for session storage.
Deploy an Application Load Balancer in front of an EC2 Auto Scaling group that spans multiple AZs. Use AWS Backup to create snapshots of the EBS volumes and have a script to restore to a new instance in a different AZ upon failure.
The correct answer is to use an Application Load Balancer (ALB) with a multi-AZ Auto Scaling group and an Amazon ElastiCache for Redis cluster. This approach effectively decouples the application's state from the compute instances. By moving the session data to a centralized, highly available ElastiCache for Redis cluster, any EC2 instance in any AZ can handle any user request, as the session data is no longer stored locally. The multi-AZ Auto Scaling group ensures that the application is resilient to both instance failures (by automatically replacing unhealthy instances) and AZ failures (by distributing instances across multiple zones). The ALB distributes traffic across these healthy instances. This solution requires only a configuration change in the application to point to the Redis endpoint, rather than a full re-architecture.
Using a Network Load Balancer (NLB) with sticky sessions is incorrect because if the specific instance a user is 'stuck' to fails or the AZ it is in becomes unavailable, the user's session data is lost. Sticky sessions do not provide resiliency for the session state itself.
Using AWS Backup with a manual or scripted restore process is a disaster recovery (DR) strategy, not a high availability (HA) solution. This approach would result in significant downtime while new instances are provisioned and restored from a snapshot, failing to meet the requirement for high availability.
Using AWS Global Accelerator to fail over between two standalone instances is not ideal. This is an active-passive setup which is less resilient than an active-active load-balanced architecture. More importantly, it does not solve the core problem of session state. When a failover occurs to the standby instance, the in-memory session data from the primary instance is lost.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Amazon ElastiCache and how does it improve availability and session management?
Open an interactive chat with Bash
What is an Auto Scaling group and why is it important for high availability?
Open an interactive chat with Bash
How does an Application Load Balancer (ALB) ensure high availability and handle traffic routing?
Open an interactive chat with Bash
AWS Certified Solutions Architect Professional SAP-C02
Continuous Improvement for Existing Solutions
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access