Scaling: Vertical vs Horizontal vs Auto
Subtitle: Add power, add boxes, or add rules. Left column - VERTICAL (scale up): Bigger machine: more CPU and RAM No code change needed One box, one hard ceiling Resize usually means downtime Cost climbs fast at the top end Middle column - HORIZONTAL (scale out): More machines behind one door Load balancer spreads traffic App must be stateless first Headroom is near-linear You now own data splitting Right column - AUTO (scale by rule): Horizontal plus a policy A metric adds or drops boxes Warm-up lag is always real Pay only for what you run Tight limits cause flapping Simple difference: Vertical = one bigger box Horizontal = many boxes Auto = many boxes, on demand Use it when - VERTICAL: Early days, small team The single primary database You need a fix tonight Use it when - HORIZONTAL: Traffic outgrew one machine You want no single ceiling Use it when - AUTO: Spiky or daily traffic waves Sticky note - Common beginner mistake: Autoscaling an app that still holds state. New boxes start with empty sessions and cold caches, so latency gets worse as you add capacity. Make it stateless first, then automate.