Dev.to
7/23/2026

The original title is about horizontal vs vertical scaling for Node.js apps, specifically about making them stateless for scale-out.
Original: Scaling Your App: Horizontal vs Vertical — Lessons from *The Matrix*
Short summary
A developer shares lessons on scaling apps horizontally vs vertically, using The Matrix as an extended metaphor. Vertical scaling (bigger machine) is simple but has hard ceilings and single points of failure. Horizontal scaling (more instances behind a load balancer) requires making the app stateless by externalizing sessions and cache to services like Redis. Code examples show before/after Node.js server implementations.
- •Vertical scaling is simple but hits hardware ceilings and creates single points of failure
- •Horizontal scaling requires stateless apps with externalized state (Redis, DB)
- •Code examples demonstrate moving from in-memory sessions to Redis-backed sessions
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



