EASYFundamentalssenior engineer
Horizontal vs Vertical Scaling
Compare horizontal scaling (scaling out) vs vertical scaling (scaling up). What are the trade-offs?
Estimated Time: 45 minutes
#fundamentals#scalability#infrastructure
Solution Overview
Vertical scaling adds more power to existing machines; horizontal scaling adds more machines. Horizontal is generally preferred for large-scale systems.
Hints to Get Started
1
Think about database scaling challenges
2
Consider stateless vs stateful services
Recommendation
Start vertical, plan for horizontal from day one
Vertical Scaling
cons
- •Hardware limits
- •Single point of failure
- •Expensive at scale
- •Downtime for upgrades
pros
- •Simpler implementation
- •No code changes needed
- •Lower initial complexity
Horizontal Scaling
cons
- •Application must support it
- •Data consistency challenges
- •More complex infrastructure
pros
- •Near-infinite scaling
- •Better fault tolerance
- •Cost-effective
- •No downtime