Q99 — AWS SAA-C03 Ch.12
Question 99 of 100 | ← Chapter 12
Q899. A company hosts an application on Amazon EC2 instances that run in a single Availability Zone. The application is accessible by using the transport layer of the Open Systems Interconnection (OSI) model. The company needs the application architecture to have high availability.Which combination of steps will meet these requirements MOST cost-effectively? (Choose two.)
- A. Configure new EC2 instances in a different Availability Zone. Use Amazon Route 53 to route traffic to all instances.
- B. Configure a Network Load Balancer in front of the EC2 instances. ✓
- C. Configure a Network Load Balancer for TCP traffic to the instances. Configure an Application Load Balancer for HTTP and HTTPS traffic to the instances.
- D. Create an Auto Scaling group for the EC2 instances. Configure the Auto Scaling group to use multiple Availability Zones. Configure the Auto Scaling group to run application health checks on the instances. ✓
- E. Create an Amazon CloudWatch alarm. Configure the alarm to restart EC2 instances that transition to a stopped state.
Correct Answer: B. Configure a Network Load Balancer in front of the EC2 instances., D. Create an Auto Scaling group for the EC2 instances. Configure the Auto Scaling group to use multiple Availability Zones. Configure the Auto Scaling group to run application health checks on the instances.
Explanation
To achieve high availability for the application hosted on Amazon EC2 instances, the following two steps can be taken:B. Configure a Network Load Balancer in front of the EC2 instances.By configuring a Network Load Balancer (NLB), traffic can be evenly distributed across multiple EC2 instances. The NLB provides high availability by automatically routing traffic to healthy instances within the same Availability Zone or across multiple Availability Zones. This helps to ensure that the application remains accessible even if one of the instances or Availability Zones becomes unavailable.D. Create an Auto Scaling group for the EC2 instances. Configure the Auto Scaling group to use multiple Availability Zones. Configure the Auto Scaling group to run application health checks on the instances.By creating an Auto Scaling group (ASG), you can automatically adjust the number of EC2 instances based on demand or health conditions. Configuring the ASG to use multiple Availability Zones ensures that instances are distributed across different data centers, providing resilience in case of an outage in one Availability Zone. By running application health checks on the instances, the ASG can automatically replace any unhealthy instances, further enhancing availability.Option A suggests configuring new EC2 instances in a different Availability Zone and using Amazon Route 53 to route traffic to all instances. While this approach can provide high availability, it does not offer the same level of automation and scalability as using a Network Load Balancer and Auto Scaling group. Additionally, using Route 53 may introduce additional costs and complexity. Therefore, Option A is not the most cost-effective solution.Option C suggests configuring a Network Load Balancer for TCP traffic and an Application Load Balancer for HTTP and HTTPS traffic. While this approach can provide flexibility for different types of traffic, it may introduce unnecessary complexity and cost. Using a single Network Load Balancer is sufficient for achieving high availability at a lower cost. Therefore, Option C is not the most cost-effective solution.Option E suggests creating an Amazon CloudWatch alarm to restart EC2 instances that transition to a stopped state. While this may help in maintaining availability, it does not address the need for distributing traffic across multiple instances or Availability Zones. Additionally, automatically restarting instances may not be the most efficient solution for handling availability issues. Therefore, Option E is not the most suitable choice.In summary, to achieve high availability for the application hosted on Amazon EC2 instances in a cost-effective manner, configuring a Network Load Balancer in front of the instances (Option B) and creating an Auto Scaling group that spans multiple Availability Zones with health checks enabled (Option D) are the recommended steps.