AWS Load Balancer and Auto Scaling Case Study
Problem: Migrate infrastructure from on-premise to AWS to cut down expenses and handle increase in load requests. Create Load Balancer for load distribution, distribute traffic and scale up/down based on CPU utilization.
Step1: Create two EC2 instances
Step2: Install Apache web server by logging on thru Putty
Step3: Create Target Group policy (Blue, Green) for each instance
Step4: Create an application Load Balancer with weighted rule to forward 70 % traffic to blue and remaining to green target group
Step4: Auto Scaling is based on Launch configuration which implicitly works by AMI. Lets create AMI by stopping one of EC2 instance.
Step5: Route 53 is a highly available and scalable cloud Domain Name System (DNS) web service. It is designed to give developers and businesses an extremely reliable and cost effective way to route end users to Internet applications by translating names like www.example.com into the numeric IP addresses like 192.0.2.1 that computers use to connect to each other. Amazon Route 53 is fully compliant with IPv6 as well.
Create hosted zone for the company domain and update the AWS nameservers to domain sites. Now create record in Route 53 to route traffic to Load Balancer.
E2E flow is: Client browser-->Domain Namespace→ Route 53→ App Load Balancer→ Green/Blue target group→ Auto Scale in/out EC2 instance AMI based on CPU Utilization monitored by CloudWatch Alarm
Step6: Create Launch config with AMI and create auto Scaling Group with this launch config. attach the load balancer and specify target groups
Step7: define Auto Scaling policy by creating alarm in cloudwatch to monitor CPU usage
Move to Auto Scaling group to define dynamic scaling policy based on the alarms created
No comments:
Post a Comment