Scaling up vs. Scaling out
Jeff Atwood posted about the hidden costs of scaling up vs. scaling out. It is a good a post. In a nutshell, here are his points:
- Scaling out gets you about 10 times the hardware for the same price.
- Scaling out costs roughly 8 times more in software licensing.
- Scaling out my only make financial sense using open source software(or when you can no longer scale up).
Those are good points. However, there are more downsides to scaling out.
- Administrative overhead of more servers and the replication\load balancing methodology.
- Scaling out with read only server is a misnomer. The read only server still has to take all the writes one way or another.
- App dev time. All of the scale out setups I have seen require a good amount of dev work. Some more than others.
It is my opinion that the app be should tuned first, then upgrade the hardware and then tuned some more. After that, look to offload work to the app\web tier with stuff like caching. By then, newer hardware will be available for a tech refresh. Scale out as a last resort. Sound like a pain? Try scaling out.
You see funny problems start popping up when you scale out. Take a read only scale out using transactional replication in SQL Server or Master\Slave in MySQL for example. In this scenario, you can lose read consistency. Lets say you get the product list from the read server, place your order which writes to the write server but in that time that product sold out. It is like NOLOCK but worse because the latency is longer. Sometimes much longer.
There are diminishing returns and resource splitting with scaling out. The diminishing returns is usually due to the replication overhead while reading from the write server and writing to the read servers. On top of that, now you N times the data with the number of disks\CPU\memory divided by N. You could get around this through sharding but then you are talking major app dev time.
Still want to scale out? Ok, ok, I will talk about good not bad ways to do it in the next post.
This content is published under the Attribution-Share Alike 3.0 Unported license.
Comments
-
Adam Machanic
-
Michael O'Neill
-
statisticsio
-
Michael O'Neill
-
AK
