Vertical vs horizontal scaling?
Understand the concept
Vertical scaling adds resources to one machine, while horizontal scaling adds machines and distributes requests or data. Horizontal scaling improves capacity only if work can be shared without losing correct state coordination. Stateless request handlers are easier to spread, but databases, sessions and background work may still need special handling.
Important ideas
-
Vertical: give one machine more CPU or memory.
-
Horizontal: add instances and distribute work.
-
Keep request-serving instances stateless; move shared durable state to suitable storage.
-
Doubling app instances also increases possible database connections and dependency traffic; budget shared resources across the fleet.
Can you explain it without the notes?
Vertical vs horizontal scaling?
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
Vertical scaling adds resources to one machine, while horizontal scaling adds machines and distributes requests or data. Horizontal scaling improves capacity only if work can be shared without losing correct state coordination. Stateless request handlers are easier to spread, but databases, sessions and background work may still need special handling.
Turn this concept into a clear answer.
- State which tier is being scaled and whether the bottleneck moves to another tier afterward.
Keep connecting the ideas.
Next lesson: Cache, CDN, replica or shard: which solves what?Adapted from 07_SYSTEM_DESIGN_ARCHITECTURE.md · “Vertical vs horizontal scaling?”. Examples are study fragments; framework behavior can depend on your version.