You work in an IT unicorn startup as a senior DevOps engineer.
Your department is developing an online training platform in AWS.
You are responsible for designing a CI/CD pipeline for the said application.
One key requirement is that the applications in AWS should be highly available and auto-heal when errors have occurred.
Which AWS services can help you achieve this requirement? (Select TWO.)
Click on the arrows to vote for the correct answer
A. B. C. D. E.Correct Answer - A, D.
AWS has provided various services to help users deploy applications that are highly available, fault-tolerant, and self-healing.
The key for auto-healing is that whenever an error appears in an instance, there is a way to launch a new one while stopping the problematic instance automatically.
Option A is CORRECT: Because OpsWorks has provided an auto-healing feature for its layer.
If an agent fails to communicate with the OpsWorks service for some time, AWS OpsWorks Stack automatically replaces the failed instance if the feature is enabled as below:
Option B is incorrect: Because unlike AWS OpsWorks, there is no auto-healing feature for Elastic Beanstalk.
Elastic Beanstalk has to rely on ELB and Auto Scaling Group to provide an auto-healing system.
Elastic Beanstalk application cannot enable an auto-healing feature.
Option C is incorrect: Although CloudFormation helps create stacks automatically, it does not mention how to achieve auto-healing.
Option D is CORRECT: Because ELB and ASG can help to achieve an elastic and self-healing system very quickly.
If any instance goes wrong and fails the health check in ELB, ASG stops the instance and launches a new one to replace it.
Option E is incorrect: Because, although this option can auto alert the on-call team, it still needs manual actions to recover the system.
To design a highly available and auto-healing CI/CD pipeline for an online training platform in AWS, we can use the following two AWS services:
To create a highly available and auto-healing Elastic Beanstalk application, we need to enable the following features:
Load Balancing: Elastic Beanstalk automatically provisions an Elastic Load Balancer (ELB) and routes incoming traffic to the instances running the application. This distributes the traffic evenly across the instances and ensures that the application is highly available.
Auto Scaling: Elastic Beanstalk monitors the health of the application and automatically scales up or down the number of instances based on the traffic volume and the health of the instances. This ensures that the application is always available and responsive.
ELB is a managed load balancing service that distributes incoming traffic across multiple instances or containers. It supports both Application Load Balancers (ALBs) and Network Load Balancers (NLBs). ALBs can route traffic based on application-level information, such as URL paths and headers, whereas NLBs route traffic at the transport layer, such as TCP and UDP.
Auto Scaling is a service that automatically scales EC2 instances based on the application's workload. It can scale up or down the number of instances based on the CPU utilization, memory utilization, or custom metrics.
By using ELB and Auto Scaling together, we can achieve high availability and auto-healing in the following way:
Create an ELB and attach an Auto Scaling Group (ASG) to it. The ASG launches and terminates instances based on the load on the application.
Configure the ELB to distribute traffic evenly across the instances. This ensures that the application is highly available and can handle increased traffic.
Set up an auto-scaling policy that scales up or down the number of instances based on the CPU utilization. This ensures that the application is always available and responsive even under heavy load.
In summary, Elastic Beanstalk and Elastic Load Balancer with Auto Scaling are the two AWS services that can help achieve high availability and auto-healing in a CI/CD pipeline for an online training platform.