Lesson 17 of 36 · see all lessons
Start here: cloud concepts (domain 1, 24%)
- 1. Start here: the exam, the plan and what you already know
- 2. What the cloud is: benefits, service models and deployment models
- 3. AWS global infrastructure: Regions, Availability Zones and edge locations
- 4. Cloud economics: what you pay for on-premises vs in the cloud
- 5. The AWS Well-Architected Framework: six pillars
- 6. Moving to AWS: the Cloud Adoption Framework and migration strategies
Security and identity (domain 2, 30%)
- 7. The shared responsibility model: who secures what
- 8. IAM basics: users, groups, roles and policies
- 9. Protecting the root user, MFA and credentials
- 10. Identity at scale: IAM Identity Center, federation and cross-account access
- 11. Encryption and keys: protecting data at rest and in transit
- 12. Threat protection: Shield, WAF, GuardDuty, Inspector and Security Hub
Governance, ways of working and compute (domains 2 and 3)
- 13. Logging, auditing and compliance: CloudWatch, CloudTrail, Config and Artifact
- 14. Governing many accounts: Organizations, Control Tower and Service Catalog
- 15. Ways to use AWS: console, CLI, SDKs and infrastructure as code
- 16. Amazon EC2: virtual servers and instance types
- 17. Elasticity: Auto Scaling and Elastic Load Balancing
- 18. Containers and serverless: ECS, EKS, Fargate, Lambda and more
Storage, databases and networking (domain 3, 34%)
- 19. Block and file storage: EBS, instance store, EFS and FSx
- 20. Amazon S3: buckets, storage classes and lifecycle policies
- 21. Hybrid storage, backup and disaster recovery
- 22. Databases: RDS, Aurora, DynamoDB, ElastiCache and more
- 23. Networking: VPCs, subnets, gateways and security layers
- 24. Connecting and delivering: Route 53, CloudFront, VPN and Direct Connect
Analytics, AI, integration and more (domain 3)
Billing, pricing and support, then exam practice (domain 4, 12%)
- 29. Pricing models: On-Demand, Savings Plans, Reserved, Spot and Dedicated
- 30. Billing and cost tools: Budgets, Cost Explorer, Pricing Calculator and tags
- 31. AWS Support plans, Trusted Advisor and where to get help
- 32. Final review and exam day: every decision on one page
- 33. Mock exam 1
- 34. Mock exam 2 Exam Pack · $12
Extra practice: mock exams 3 and 4
17 min
Elasticity: Auto Scaling and Elastic Load Balancing
Use Auto Scaling for elasticity and load balancers to spread traffic and survive failures.
By the end of this lesson you can
- Explain how Auto Scaling makes an application elastic
- Tell scaling up from scaling out
- Describe what a load balancer does and why it adds availability
- Choose an Application, Network or Gateway Load Balancer from a scenario
From earlier lessons · 1 of 2
Cedar Lane Books wants its web servers to keep running if one data center fails. Where should it place the servers?
Pick one answer.
From earlier lessons · 2 of 2
A team runs a batch job that is limited by processor speed. Which EC2 instance family fits?
Pick one answer.
Last Black Friday, Cedar Lane Books' website went down at 9:02 a.m. Ten times the usual shoppers arrived, and one server gave up. Buying ten servers for one day a year would waste money the other 364. The shop needs servers that appear when shoppers do, and vanish when they leave.
Elasticity: scale out, then scale in
Exam depth: know it cold.
Elasticity means capacity follows demand: it grows when traffic rises and shrinks when traffic falls. You stop guessing how many servers you need.
There are two ways to add capacity:
- Scale up (vertical): swap in a bigger instance. Going back down is scale down.
- Scale out (horizontal): add more instances. Removing them is scale in.
Scaling up has a ceiling, the largest instance size, and one server is still one point of failure. Scaling out spreads the work over many smaller servers, so losing one hurts less. That's why AWS designs favor scaling out.
| Scale up (vertical) | Scale out (horizontal) | |
|---|---|---|
| What changes | The instance size. | The number of instances. |
| Example | m7g.large to m7g.4xlarge. | 2 instances to 8 instances. |
| Limit | The biggest size on offer. | Very high, set by your quotas. |
| One server fails | The whole app is down. | The others keep serving. |
| AWS tool | Change the instance type. | EC2 Auto Scaling. |
Decision rule: "more instances" or "horizontal" is scale out. "Larger instance" or "more memory on the server" is scale up.
A company handles a sales peak by adding four more identical EC2 instances behind its website, then removing them afterward. What is this an example of?
Pick one answer.
Amazon EC2 Auto Scaling groups
Exam depth: know it cold.
Amazon EC2 Auto Scaling keeps the right number of instances running. You put instances in an Auto Scaling group and set three numbers:
- Minimum: the group never drops below this.
- Desired capacity: how many it runs right now.
- Maximum: the group never grows past this, which caps cost.
It does three jobs. It scales out and in as demand changes. It runs health checks and replaces unhealthy instances. And it spreads instances across Availability Zones, so if one zone fails, it launches replacements in another.
Auto Scaling itself is free. You pay only for the instances and other resources it runs.
Ways to scale (recognize them):
| Method | When it fits |
|---|---|
| Manual | You change the desired capacity yourself. |
| Scheduled | You know the date and time, such as a sale starting Friday at 9 a.m. |
| Dynamic | You don't know when traffic will change, so a metric such as CPU at 50% drives it. |
| Predictive | Traffic follows daily or weekly patterns, so capacity is added in advance. |
AWS Auto Scaling (recognize it) is a separate service. Its scaling plans scale several resource types together: EC2 Auto Scaling groups, Amazon ECS tasks, Amazon DynamoDB capacity and Amazon Aurora replicas. Amazon EC2 Auto Scaling covers EC2 instances only.
Cedar Lane Books knows its January sale starts at 8 a.m. on the 2nd and ends at midnight. It wants extra EC2 capacity ready for exactly that window. Which scaling method fits best?
Pick one answer.
Elastic Load Balancing: one front door, many servers
Exam depth: know it cold.
Elastic Load Balancing (ELB) spreads incoming traffic across many targets, such as EC2 instances, containers and IP addresses.
- Single point of contact: shoppers reach one address, the load balancer, not each server.
- Health checks: it tests each target and sends traffic only to healthy ones.
- Multiple Availability Zones: if one zone fails, traffic goes to targets in the others.
- Scales itself: AWS grows the load balancer as traffic grows. It's a managed service.
- Offloads encryption: it can handle HTTPS so servers focus on their main work.
Together, ELB and Auto Scaling give you elasticity and high availability. New instances register with the load balancer automatically.
Three load balancer types
Exam depth: recognize it. Know which type fits which traffic.
| Type | Traffic | Strength | Pick it when |
|---|---|---|---|
| Application Load Balancer | HTTP and HTTPS. OSI layer 7, the application layer. | Reads each request and routes by URL path or host name. | A website or API sends "/books" to one group and "/checkout" to another. |
| Network Load Balancer | TCP, UDP and TLS. Layer 4, the transport layer. | Millions of requests per second. A static IP address per zone. | You need extreme speed, non-HTTP traffic or a fixed IP. |
| Gateway Load Balancer | All IP packets. Layer 3, the network layer. | Deploys and scales third-party virtual appliances. | Traffic must pass through firewalls or intrusion detection appliances. |
The Classic Load Balancer is the previous generation. AWS recommends moving off it.
Decision rule: web and URLs pick Application. Speed, UDP or static IP pick Network. Third-party security appliances pick Gateway.
Cedar Lane Books wants requests for /books to go to one group of servers and requests for /checkout to go to another, behind one web address. Which load balancer should it use?
Pick one answer.
Black Friday at Cedar Lane, end to end
Put in order
Put the Black Friday events in the order they happen.
Drag, or focus an item and press Space, move with the arrow keys, then Space to drop.
- New instances launch across both Availability Zones
- Traffic falls and the group scales in to its minimum
- Shoppers flood in and average CPU passes the target
- The new instances register with the load balancer
- The Auto Scaling group raises desired capacity
- The load balancer spreads requests across all healthy instances
Exam-style practice
A gaming company sends UDP traffic to its game servers. It needs millions of requests per second and a static IP address that partners can allow in their firewalls. Which load balancer fits?
Pick one answer.
A company's web traffic rises and falls through the day. It wants EC2 capacity to grow and shrink with demand, and unhealthy instances replaced automatically. Which AWS service meets these requirements?
Pick one answer.
A bank must send all network traffic through a fleet of third-party firewall appliances on EC2, and scale that fleet with demand. Which load balancer type is built for this?
Pick one answer.
Worth keeping
- Elasticity means capacity follows demand; Auto Scaling delivers it for EC2.
- Scale out adds instances; scale up makes one instance bigger.
- An Auto Scaling group keeps between its minimum and maximum, replaces unhealthy instances and spans Availability Zones.
- A load balancer is one front door that sends traffic only to healthy targets in several zones.
- Web and URL paths: Application. Speed, UDP or static IP: Network. Security appliances: Gateway.
On the job
A project manager planning a product launch gets asked, "Will the site cope?" The useful answer isn't a server count. Try this: "The web tier runs in an Auto Scaling group across two zones. It sits behind a load balancer, with a maximum of 20 instances." Now finance knows the worst-case cost. Leadership knows the site survives a zone failure. Engineering knows the ceiling to test.
Cedar Lane still patches every one of those servers. What if it didn't have to run servers at all? Next lesson: containers, AWS Fargate and AWS Lambda.
Leaderboard
Loading…
50 XP for each lesson you finish, 10 for each right answer. Names show only for learners who turn on Show me on leaderboards.
Embed this practice on your site
Free for classrooms, blogs and study groups. Paste this into any page that accepts HTML.
Report a copyright problem with this lesson
Sources for this lesson (14)
Each fact in the lesson is marked with the number of the page it comes from.
- [4]AWS: CLF-C02 Content Domain 3: Cloud Technology and Services
- [11]AWS: Six advantages of cloud computing
- [182]AWS: SUS02-BP01 Scale workload infrastructure dynamically
- [183]AWS: Reliability pillar: Design principles
- [184]AWS: What is Amazon EC2 Auto Scaling?
- [185]AWS: Auto Scaling benefits for application architecture
- [186]AWS: Choose your scaling method
- [187]AWS: What is a scaling plan?
- [188]AWS: What is Elastic Load Balancing?
- [189]AWS: How Elastic Load Balancing works
- [190]AWS: What is an Application Load Balancer?
- [191]AWS: Listeners for your Application Load Balancers
- [192]AWS: What is a Network Load Balancer?
- [193]AWS: What is a Gateway Load Balancer?