
Answer-first summary for fast verification
Answer: Launch two EC2 instances, each in a different Availability Zone in the same AWS Region. Install the database on both EC2 instances. Configure the EC2 instances as a cluster. Set up database replication.
## Explanation **Option A** is the correct answer because it provides: 1. **High Availability**: Two EC2 instances in different Availability Zones (AZs) within the same region 2. **Automatic Failover**: Configuring the instances as a cluster with database replication enables automatic failover when a disruptive event occurs 3. **Multi-AZ Architecture**: Different AZs provide fault isolation - if one AZ fails, the other can continue operating 4. **Database Replication**: Ensures data consistency and enables failover **Why other options are incorrect:** **Option B**: Uses only a single EC2 instance with AMI backups and CloudFormation automation. This doesn't provide automatic failover - it requires manual intervention or automated provisioning which takes time and doesn't maintain continuous availability. **Option C**: Uses different AWS Regions, which is overkill for high availability within a single region. Multi-region deployments are for disaster recovery (DR) scenarios, not for high availability within a region. Also, cross-region failover is typically more complex and may not be automatic. **Option D**: Uses only a single EC2 instance with AMI backups and EC2 automatic recovery. EC2 automatic recovery only works for instance-level issues (like hardware failure) within the same AZ, not for AZ-level failures. It doesn't provide true high availability or automatic failover to another AZ. **Key AWS Concepts:** - **Availability Zones (AZs)**: Physically separate data centers within a region with independent power, cooling, and networking - **High Availability**: The ability of a system to remain operational with minimal downtime - **Automatic Failover**: The process of automatically switching to a redundant or standby system when the primary system fails - **Database Replication**: Copying data from one database to another to ensure consistency and availability For critical applications requiring high availability with automatic failover, a multi-AZ architecture with clustering and replication is the recommended approach on AWS.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A company needs to run a critical application on AWS. The company needs to use Amazon EC2 for the application's database. The database must be highly available and must fail over automatically if a disruptive event occurs.
Which solution will meet these requirements?
A
Launch two EC2 instances, each in a different Availability Zone in the same AWS Region. Install the database on both EC2 instances. Configure the EC2 instances as a cluster. Set up database replication.
B
Launch an EC2 instance in an Availability Zone. Install the database on the EC2 instance. Use an Amazon Machine Image (AMI) to back up the data. Use AWS CloudFormation to automate provisioning of the EC2 instance if a disruptive event occurs.
C
Launch two EC2 instances, each in a different AWS Region. Install the database on both EC2 instances. Set up database replication. Fail over the database to a second Region.
D
Launch an EC2 instance in an Availability Zone. Install the database on the EC2 instance. Use an Amazon Machine Image (AMI) to back up the data. Use EC2 automatic recovery to recover the instance if a disruptive event occurs.