4 ms·
Agreed; but to clarify, the first thing to do is to scale vertically (get bigger servers). When you're starting hit limits with that, then optimise, within rea
by metafunctor 6y ago
Agreed; but to clarify, the first thing to do is to scale vertically (get bigger servers). When you're starting hit limits with that, then optimise, within reason. When you're starting to hit limits there, then scale horizontally (add more servers).
The point with optimizing before scaling horizontally is to make sure you understand what is going on. Scaling horizontally without a good understanding is going to be a fail-whale shitshow.
I'd also note that high availability needs some horizontal scaling.
- greggyb 6y agoHA and scaling are not the same thing. High availability represents architectural decisions to maintain operation in the face of subsystem failures. With respect to high availability within a data center, this can be achieved with a passive secondary system and a mechanism to failover to this secondary in the face of a primary failure. Such an HA strategy is valid, but provides no horizontal scalability. Scalability is the ability to serve more traffic. Scaling horizontally implies adding hardware. Though the HA example given above includes additional hardware compared to a single primary node, it does not support any additional traffic. Scaling would imply that the addition of the secondary server allows the system to serve more traffic.
- lmilcin 6y agoNo, don't scale first. First try to optimize your app to use as little resources as possible, then scale vertically, then horizontally.