Scale Up Adds Resources to One Machine, Scale Out Adds Machines
An application gains capacity in one of two directions: vertically (scale up), by giving one server more CPU or memory, or horizontally (scale out), by adding servers that share the load. Independently, scaling can be manual or automatic. Which combination fits depends on what the application runs short of and when.
Direction: Up or Out
| Scale up (vertical) | Scale out (horizontal) | |
|---|---|---|
| How | bigger instance, more CPU or RAM | more instances behind a load balancer |
| Limit | the largest machine available | how well the app runs as several copies |
| Requires | usually a restart | a stateless app, or shared state (database, cache, sessions) |
| Failure impact | one machine, one point of failure | losing one instance reduces capacity only |
Control: Manual, Scheduled or Automatic
- Manual: someone resizes or adds instances.
- Scheduled: capacity changes at known times, for predictable peaks (business hours, month-end).
- Automatic (elasticity): the platform adds or removes instances when a metric crosses a threshold: AWS Auto Scaling, Azure Autoscale, or a Kubernetes HorizontalPodAutoscaler.
Decide from Metrics, Not Guesses
- Find the bottleneck: is the app CPU-bound or memory-bound?
- Look at 3–6 months of utilisation: are spikes constant, recurring at fixed times, or random?
- Recurring spikes call for scheduled scaling; unpredictable ones for autoscaling.
References
- Cloud Computing MOC - hub for cloud notes.
- NIST Defines Cloud Computing by Five Essential Characteristics - rapid elasticity as a defining trait of cloud.
- Amazon CloudWatch: Collect metrics with the CloudWatch agent - memory and disk metrics for EC2.
- Kubernetes documentation: Horizontal Pod Autoscaling - automatic scale-out inside a cluster.
Review cards
Flashcard Why can scaling out require changes to the app when scaling up doesn't?
Several copies must share the load, so the app has to be stateless or keep its state in a shared database, cache or session store. A bigger machine runs the app unchanged, usually after a restart.
Flashcard Why can't you autoscale a memory-bound app on EC2 out of the box?
EC2 reports CPU but not memory usage by default; memory needs the CloudWatch agent. A policy can only scale on a metric that is collected.