-2

AWS instances usually have a linear pricing model:

i.e. 2 small instances are the same price as one medium instance (which has exactly 2x the performance specs).

So what would be the better choice? Double the machine performance, or double the machines. Please disregard the advantage of redundancy gained from using two small machines.

1
  • 2
    it depends on the application you are hosting and the technology used and willing to be used
    – ignivs
    Apr 8, 2016 at 15:46

2 Answers 2

1

Scale horizontally. It splits up the points of contention (GC, network, memory singletons), allows you to scale better (an app that can go horizontal can be scaled larger then vertical), and a node failure doesn't take out your entire app.

AWS has the ability to add more nodes based on some trigger. It can't add more CPU/memory to a running instance.

More machines also will tend to force you to think about proper deployment / monitoring regimes instead of having a Special Snowflake that you're scared of losing.

1
  • Scaling horizontally is generally better, and can be done without downtime. Scaling vertically requires servers to be stopped and started. Horizontally requires an ELB which is additional cost, so scaling vertically can be better value if your server can tolerate some downtime. Some applications may scale better vertically than horizontally and it reduces complexity significantly - for example database servers you can scale to multiple nodes easily, but there's more to consider. So I agree with your answer, but it depends on the application.
    – Tim
    Apr 10, 2016 at 20:14
0

My approach is scale vertically first and then horizontally. Scaling horizontally comes with maintenance overhead, so I usually start with two instances, scale them vertically for as long as it makes sense and then start adding more instances. However, this is not an universal rule and it may not be applicable in your situation.

Not the answer you're looking for? Browse other questions tagged .