Question #1843
A company hosts a web application on a single Amazon EC2 instance with a PostgreSQL database running on the same instance. The company requires a fault-tolerant and auto-scaling architecture to manage sudden traffic spikes.
Deploy the application to EC2 instances in an Auto Scaling group behind an Application Load Balancer. Use an Amazon Redshift cluster configured for PostgreSQL compatibility with multiple nodes.
Deploy the application to EC2 instances configured as a target group behind an Application Load Balancer. Set up an Amazon RDS for PostgreSQL Multi-AZ DB instance with read replicas.
Deploy the application to EC2 instances in an Auto Scaling group behind an Application Load Balancer. Migrate the database to an Amazon Aurora Serverless PostgreSQL-compatible cluster.
Deploy the application to EC2 instances in a target group behind an Application Load Balancer. Implement an Amazon DynamoDB table with auto-scaling for the database layer.
Explanation
Option C is correct because:
- EC2 in an Auto Scaling group with ALB ensures the application layer scales horizontally during traffic spikes and provides fault tolerance by distributing traffic across instances.
- Amazon Aurora Serverless is PostgreSQL-compatible, automatically scales database capacity based on demand, and handles fault tolerance natively. This eliminates the need for manual database scaling or read replicas.
Other options are incorrect because:
- A: Amazon Redshift is a data warehouse, not suitable for OLTP workloads like a web app's database.
- B: While RDS Multi-AZ provides high availability, it lacks automatic scaling for write operations. Read replicas only scale read traffic, not writes.
- D: DynamoDB is a NoSQL database, which may require significant application changes if migrating from PostgreSQL. It’s unsuitable unless the app is designed for NoSQL.
Key Points: Use Auto Scaling + ALB for application layer scalability. Aurora Serverless provides auto-scaling and PostgreSQL compatibility for the database layer.
Answer
The correct answer is: C