Study guide
Technical reference and lesson notes
AWS Elasticity: Scaling Up vs. Scaling Out
Purpose of This Lesson
This lesson explains elasticity and distinguishes between scaling up, also called vertical scaling, and scaling out, also called horizontal scaling. These distinctions are important when selecting an AWS capacity strategy, evaluating resilience, and preparing for scenarios involving Amazon EC2.
Key Concepts
- Scalability means adding resources to support increased demand.
- Elasticity means automatically increasing resources when demand rises and reducing them when demand falls.
- Scaling up / vertical scaling adds CPU, memory, storage, network bandwidth, or other resources to one instance.
- Scaling out / horizontal scaling adds more instances running the application.
- Scaling up can leave the application with a single point of failure and has a finite hardware limit.
- Scaling out distributes capacity across multiple instances, improving resiliency and providing room for continued expansion.
- AWS elasticity helps organizations pay for resources as they use them rather than maintaining all underlying infrastructure at a fixed on-premises cost.
Scaling and Elasticity in AWS
Scalability versus Elasticity
A system is scalable when it can receive additional resources. For example, adding another hard drive creates more storage capacity, but the added hardware remains in place even if the extra capacity is no longer needed.
A system is elastic when it can expand and contract in response to demand. Cloud services can increase capacity during busy periods and reduce capacity when demand decreases. This ability to scale back is the defining difference between simple resource expansion and elasticity.
Scaling Up: Vertical Scaling
Vertical scaling increases the resources assigned to a single instance. For an Amazon EC2 instance, this can involve moving to an instance type with more:
- CPU capacity
- Memory
- Storage capacity
- Network bandwidth
- Network adapters
For example, an EC2 instance could be changed from a T2 micro instance with 1 vCPU and 1 GB of RAM to a larger instance type such as a C5.X large instance with 4 vCPUs and 8 GB of RAM. The application remains on one instance; that instance simply receives more resources.
The main limitation is that the instance still represents one failure domain. If it fails, the entire application hosted on it can become unavailable. Vertical scaling also eventually reaches the largest available resource configuration for that instance family or environment.
Scaling Out: Horizontal Scaling
Horizontal scaling increases capacity by adding more instances rather than making one instance larger. Several EC2 instances can run the application, allowing the workload to be distributed across them.
This approach provides greater resiliency because the application is not dependent on a single instance. If one instance fails, the remaining instances can continue handling the workload. Horizontal scaling also avoids relying on one instance’s maximum hardware capacity and can be repeated as demand grows.
The lecture introduces Amazon EC2 Auto Scaling as the mechanism that can launch and terminate instances automatically, allowing an environment to scale out and later scale back in as demand changes.
Exam- or Assessment-Relevant Takeaways
- If a scenario says to increase the CPU or memory of one existing EC2 instance, identify vertical scaling or scaling up.
- If a scenario says to add more EC2 instances, identify horizontal scaling or scaling out.
- If resilience and avoiding a single point of failure are emphasized, scaling out is the more relevant approach.
- If the requirement is to increase and later reduce resources automatically, the key concept is elasticity, not merely scalability.
- Scaling up has a capacity ceiling because one instance can only receive a finite amount of hardware.
- Scaling out offers additional capacity through multiple instances and is generally more resilient than placing all application capacity on one larger instance.
- Amazon EC2 Auto Scaling supports automatic instance launch and termination for scaling out and scaling back in.
- Do not treat scalability and elasticity as interchangeable: scalability describes adding capacity, while elasticity includes automatic contraction when capacity is no longer needed.
Tool / Feature Decision Guide
| Requirement or clue | Appropriate concept or approach | Reason |
|---|---|---|
| One EC2 instance needs more CPU or memory | Scale up / vertical scaling | Change the instance to a larger resource configuration. |
| The application needs more simultaneous instances | Scale out / horizontal scaling | Add additional instances running the application. |
| The application must tolerate failure of one instance | Prefer scaling out | Multiple instances avoid putting all capacity in one basket. |
| Demand changes over time and unused capacity should be removed | Elasticity with EC2 Auto Scaling | Instances can be launched during increased demand and terminated when they are no longer needed. |
| A workload has reached the practical size limit of one instance | Scale out | Horizontal scaling provides another path when vertical scaling reaches its ceiling. |
Common Traps / Misconceptions
- Confusing scalability with elasticity: Adding a resource once is scalability; automatically adding and removing resources as demand changes is elasticity.
- Assuming a larger instance eliminates failure risk: Scaling up still leaves one instance as a single point of failure.
- Thinking scaling out means adding hardware to an instance: Scaling out adds instances; scaling up adds resources to an existing instance.
- Assuming vertical scaling is unlimited: An instance has a maximum supported resource configuration.
- Treating more capacity as automatically more resilient: A single large instance may have more capacity but remains one failure point.
- Forgetting scale-in: Elasticity includes reducing capacity when demand falls, not only adding capacity during growth.
- Assuming on-premises infrastructure has the same cost behavior as cloud resources: On-premises environments can scale, but the underlying infrastructure generally remains a fixed cost rather than varying directly with usage.
Real-World Engineer / Analyst Notes
When analyzing a capacity problem, first determine whether the proposed change affects one instance or the number of instances. That distinction usually identifies vertical versus horizontal scaling immediately.
Next, separate capacity from resilience. A larger EC2 instance may solve a resource shortage, but it does not distribute risk. Multiple instances can provide both additional capacity and improved tolerance for the failure of an individual instance.
Finally, look for the time dimension. If capacity is added permanently, the requirement is primarily scalability. If capacity should grow during demand spikes and contract afterward, the requirement is elasticity and points toward an automated scaling workflow such as Amazon EC2 Auto Scaling.
Quick Reference Summary
- Scaling up: Make one instance larger.
- Scaling out: Add more instances.
- Scaling back in: Remove instances when they are no longer needed.
- Elasticity: Automatically scale out and back in according to demand.
- Primary vertical-scaling weakness: A single point of failure and a finite instance-size ceiling.
- Primary horizontal-scaling benefit: More capacity and better resiliency through multiple instances.
- AWS example: Change an EC2 instance type to scale up; add or terminate EC2 instances to scale out or back in.
Flashcards
Q: An EC2 workload needs more CPU and memory, but it will remain on one instance. Which scaling approach applies?
A: Scaling up, or vertical scaling. The existing instance is moved to a larger resource configuration.
Q: An application needs to run on several additional EC2 instances to handle growing demand. Which approach is this?
A: Scaling out, or horizontal scaling. Capacity increases by adding instances rather than enlarging one instance.
Q: What makes elasticity different from scalability?
A: Scalability is the ability to add resources, while elasticity includes automatically reducing resources when demand falls.
Q: Why can scaling up leave an application vulnerable even after adding substantial capacity?
A: The application is still hosted on one instance, so that instance remains a single point of failure.
Q: An environment must continue operating if one application instance fails. Which scaling direction better supports this requirement?
A: Scaling out, because multiple instances provide additional places to handle the workload if one instance fails.
Q: What is the main capacity limitation of vertical scaling?
A: A single instance can only be enlarged to the limits of the available instance configuration; it cannot grow indefinitely.
Q: What happens when an EC2 instance changes from a T2 micro to a larger instance type such as a C5.X large?
A: The same instance is assigned more resources, such as additional vCPUs and memory. This is vertical scaling.
Q: What is the decisive clue that a scenario describes horizontal rather than vertical scaling?
A: The scenario says that additional application instances are launched, rather than that CPU, memory, or other resources are added to one instance.
Q: Which AWS capability introduced in this lesson can launch and terminate EC2 instances automatically?
A: Amazon EC2 Auto Scaling. It supports scaling out and scaling back in as resource needs change.
Q: Why does scaling out generally provide more resiliency than scaling up?
A: Scaling out distributes the application across multiple instances, so failure of one instance does not necessarily remove all application capacity.
Q: A company permanently buys additional on-premises infrastructure for a capacity increase. Why is that not necessarily elasticity?
A: The added infrastructure remains available even when demand drops. Elasticity requires capacity to contract when it is no longer needed.
Q: What should you identify first when deciding whether a scenario describes scaling up or scaling out?
A: Determine whether the change increases resources on one instance or increases the number of instances. One instance means scaling up; more instances means scaling out.
Practice Questions
Question 1
A web application is running on one EC2 instance. Its CPU requirement has increased, and the proposed solution is to move it to an instance type with more vCPUs and memory. Which approach is being used?
A. Horizontal scaling
B. Vertical scaling
C. Scale-in elasticity
D. Instance termination
Correct answer: B. Vertical scaling
The decisive clue is that more resources are assigned to one existing instance rather than adding more instances.
Question 2
A workload is becoming more popular. The operations team wants additional application instances so that the loss of one instance does not remove all capacity. Which approach best matches the requirement?
A. Scaling up
B. Scaling out
C. Permanently increasing storage on one instance
D. Removing instances
Correct answer: B. Scaling out
Adding multiple instances increases capacity and avoids placing all application capacity on a single instance.
Question 3
An organization wants EC2 capacity to increase during periods of high demand and decrease when demand returns to normal. Which concept and capability are most relevant?
A. Scalability and a larger fixed instance
B. Elasticity and Amazon EC2 Auto Scaling
C. Vertical scaling and a larger hard drive
D. Fixed-cost infrastructure and manual provisioning only
Correct answer: B. Elasticity and Amazon EC2 Auto Scaling
The requirement includes both expansion and contraction, which defines elasticity. The lecture identifies EC2 Auto Scaling as a way to launch and terminate instances automatically.
Question 4
An engineer proposes replacing several application instances with one very large EC2 instance. The application will have more total resources, but the requirement emphasizes resilience if a host fails. What is the primary concern with this proposal?
A. It is horizontal scaling and creates too many instances.
B. It removes the need for elasticity.
C. It retains a single point of failure.
D. It guarantees unlimited capacity.
Correct answer: C. It retains a single point of failure.
Scaling up can increase capacity, but the application still depends on one instance. Scaling out better addresses the stated resilience requirement.
WordPress Metadata
Suggested Slug:
aws-elasticity-scaling-up-vs-scaling-out
Meta Description:
Understand AWS elasticity, vertical versus horizontal scaling, their resilience tradeoffs, and how EC2 capacity changes differ between scaling up and scaling out.
Tags:
AWS, AWS Certified CloudOps Engineer, elasticity, scalability, Amazon EC2, vertical scaling, horizontal scaling, auto scaling, high availability, business continuity