Is it better to have many less powerful droplets behind a proxy or a few more powerful?

October 10, 2016 63 views
Clustering Ubuntu 16.04

If I setup a proxy server using HAProxy and start multiple droplets behind serving webpages through nginx and Phoenix or Rails (or whatever). Is it better for me to start up twice as many 1GB/1CPU computers or half as many 2GB/2CPU computers? (Discarding the transfer limits/benefits.)

All request will fit well below the 1GB resource limit of the smaller server.

1 Answer

That is a very good question and the answer will vary a ton based on a lot of factors. There is no one right answer to this one. The choice of whether to scale vertically (bigger servers) or horizontally (more servers) is a subject of a lot of debate.

The best way to find an answer is to do some load testing on the different configurations. For example, if you set up a single 1GB node and a single 2GB node and find that the 2GB node is able to handle double the traffic of the 1GB or more than it makes sense to scale in that direction since you are able to handle more users per dollar spent. If the 2GB droplet is able to handle less than 2x what the 1GB droplet is than you may be better off scaling horizontally with smaller droplets.

This is a very simplistic example and I would recommend more extensive testing but it's unlikely you'll find a solid yes or no answer to this question that does not involve some experimentation with your particular software stack, configuration and load.

Have another answer? Share your knowledge.