Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
The Self-Taught Cloud Computing Engineer

You're reading from  The Self-Taught Cloud Computing Engineer

Product type Book
Published in Sep 2023
Publisher Packt
ISBN-13 9781805123705
Pages 472 pages
Edition 1st Edition
Languages
Author (1):
Dr. Logan Song Dr. Logan Song
Profile icon Dr. Logan Song

Table of Contents (24) Chapters

Preface 1. Part 1: Learning about the Amazon Cloud
2. Chapter 1: Amazon EC2 and Compute Services 3. Chapter 2: Amazon Cloud Storage Services 4. Chapter 3: Amazon Networking Services 5. Chapter 4: Amazon Database Services 6. Chapter 5: Amazon Data Analytics Services 7. Chapter 6: Amazon Machine Learning Services 8. Chapter 7: Amazon Cloud Security Services 9. Part 2:Comprehending GCP Cloud Services
10. Chapter 8: Google Cloud Foundation Services 11. Chapter 9: Google Cloud’s Database and Big Data Services 12. Chapter 10: Google Cloud AI Services 13. Chapter 11: Google Cloud Security Services 14. Part 3:Mastering Azure Cloud Services
15. Chapter 12: Microsoft Azure Cloud Foundation Services 16. Chapter 13: Azure Cloud Database and Big Data Services 17. Chapter 14: Azure Cloud AI Services 18. Chapter 15: Azure Cloud Security Services 19. Part 4:Developing a Successful Cloud Career
20. Chapter 16: Achieving Cloud Certifications 21. Chapter 17: Building a Successful Cloud Computing Career 22. Index 23. Other Books You May Enjoy

ELB and ASG

We previously briefed the “cattle in a herd” analogy in cloud computing. In this section, we will explain the actual implementation using ELBs and ASGs and use an example to illustrate the mechanism.

An ELB automatically distributes the incoming traffic (workload) across multiple targets, such as EC2 instances, in one or more AZs, so as to balance the workload for high performance and high availability (HA). An ELB monitors the health of its registered targets and distributes traffic only to the healthy targets.

Behind an ELB, there is usually an ASG that manages the fleet of ELB targets—EC2 instances, in our case. ASG monitors the workload of the instances and uses auto-scaling policies to scale—when the workload reaches a certain up-threshold, such as CPU utilization of 80%, ASG will launch new EC2s and add them into the fleet to offload the traffic until the utilization drops below the up-threshold. When the workload reaches a certain down-threshold, such as CPU utilization of 30%, ASG will shut down EC2s from the fleet until the utilization rises above the threshold. ASG also utilizes a health-check to monitor the instances and replace unhealthy ones as needed. During the auto-scaling process, ASG makes sure that the running EC2 instances are loaded within the thresholds and are laid out across as many AZs in a region.

Let us illustrate ELB and ASG with an example. www.zbestbuy.com is an international online e-commerce retailer. During normal business hours, it needs a certain number of web servers to work together to meet online shopping traffic. To meet the global traffic requirements, three web servers are built in different AWS regions—North Virginia (us-east-1), London (eu-west-2), and Singapore (ap-southeast-1). Depending on the customer browser location, Amazon Route 53 (an AWS DNS service) will route the traffic to the nearest web server: when customers in Europe browse the retailer website, the traffic will be routed to the eu-west-2 web server, which is really an ELB (or Application Load Balancer (ALB)), and distributed to the EC2 instances behind the ELB, as shown in Figure 1.16.

When Black Friday comes, the traffic increases and hits the ELB, which passes the traffic to the EC2 instance fleet. The heavy traffic will raise the EC2 instances’ CPU utilization to reach the up-threshold of 80%. Based on the auto-scaling policy, an alarm will be kicked off and the ASG will automatically scale, launching more EC2 instances to join the EC2 fleet. With more EC2s joining in, the CPU utilization will be dropped. Depending on the Black Friday traffic fluctuation, the ASG will always keep up to make sure enough EC2s are working on the workload with normal CPU utilization. When Black Friday sales end, the traffic decreases and thus causes the instances’ CPU utilization to drop. When it reaches the down-threshold of 30%, the ASG will start shutting down EC2s based on the auto-scaling policy:

Figure 1.16 – ELB and ASG

Figure 1.16 – ELB and ASG

As we can see from the preceding example, ELB and ASG work together to scale elastically. Please refer to https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html for more details.

You have been reading a chapter from
The Self-Taught Cloud Computing Engineer
Published in: Sep 2023 Publisher: Packt ISBN-13: 9781805123705
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}