Horizontal vs Vertical Scaling
Learn the difference between adding more servers (Horizontal) and making one server bigger (Vertical).
This lesson is purely conceptual — no AWS usage required.
AWS Services Used
Learning outcomes
By the end of this lesson, you will be able to:
- Explain the difference between horizontal scaling and vertical scaling.
- Describe what AWS means by scale out and scale in.
- Describe what AWS practitioners usually mean by scale up and scale down.
- Explain why EC2 Auto Scaling is mainly a horizontal-scaling tool.
- Choose the better scaling approach for a given scenario.
Two ways to scale
There are two main ways to handle more demand in the cloud:
- Horizontal scaling = Add more machines to your group.
- Vertical scaling = Make your existing machine bigger/stronger.
In AWS terms, EC2 Auto Scaling is almost always about horizontal scaling, because it adjusts the number of instances in an Auto Scaling group as demand changes.
A simple memory rule:
- Horizontal = More boxes (Scaling Out/In)
- Vertical = Bigger box (Scaling Up/Down)
1) Horizontal Scaling (Scale Out/In)
Horizontal scaling means adding more compute nodes instead of making one node larger.
- Scale Out: Adding more instances to handle a traffic spike (e.g., going from 2 servers to 5).
- Scale In: Removing instances when traffic drops to save costs (e.g., going from 5 servers back to 2).
Tip
The Cloud Standard: Horizontal scaling is the "Cloud Native" way to build. It works perfectly with Load Balancers because you can keep adding servers behind the same "front door."
2) Vertical Scaling (Scale Up/Down)
Vertical scaling means giving your existing server more power. On AWS, this usually means changing your Instance Type (e.g., moving from a t3.micro to a t3.large).
- Scale Up: Upgrading to a more powerful instance type with more CPU and RAM.
- Scale Down: Downgrading to a smaller, cheaper instance type.
Warning
The Downtime Risk: Vertical scaling often requires a reboot. You typically have to stop the instance, change the type, and start it again. This is why it's less flexible than horizontal scaling for live apps.
3) Why EC2 Auto Scaling is Horizontal
EC2 Auto Scaling manages groups of instances and launches or terminates them automatically. It changes how many instances exist, not the size of any individual instance.
When you configure your Auto Scaling Group (Min, Desired, Max), you are setting the boundaries for horizontal scaling.
4) Comparison Table
| Feature | Horizontal Scaling | Vertical Scaling |
|---|---|---|
| AWS Term | Scale Out / Scale In | Scale Up / Scale Down |
| Action | Add/Remove servers | Change server size (Instance Type) |
| Availability | High (multiple servers) | Lower (Single Point of Failure) |
| Flexibility | Automatic (via Auto Scaling) | Usually Manual (requires restart) |
| Best For | Fluctuating web traffic | Apps that can't run on multiple servers |
5) Horizontal and Vertical are not enemies
Real-world systems often use both:
- Step 1: Choose a reasonable "baseline" instance type (Vertical choice).
- Step 2: Use an Auto Scaling Group to add more of those instances as needed (Horizontal choice).
Micro-activity 1: Name the Scaling Type
Scaling Terminology
Match the action to the correct scaling category.
Examples
Choose one, then match it on the right
Characteristics
Select an example first
0 of 4 matched so far.
Micro-activity 2: Choose the Better Approach
Scaling Scenarios
Which approach is a better fit for these common situations?
Examples
Choose one, then match it on the right
Characteristics
Select an example first
0 of 4 matched so far.
Summary
Horizontal scaling (adding more servers) is the backbone of high-availability cloud architecture. It allows your application to grow and shrink automatically with demand. Vertical scaling (making a server bigger) is useful for quick upgrades or apps that aren't designed to run on multiple machines, but it lacks the flexibility and reliability of horizontal scaling.
Knowledge Check
Next lesson
Lesson 4.8: EC2 Module Review Quiz