A question can only have one accepted answer. Are you sure you want to replace the current answer with this one?
Changed your mind?
You previously marked this answer as accepted. Are you sure you want to unaccept it?
One big server vs several small ones
Posted October 3, 201313.7k views
I want to have separate, independent servers for frontend, backend and two databases.
Should I invest in one powerful plan (say, 8GB plan) and virtualise (divide) it into 4 parts?
Or rather buy 4 small droplets (say, 2GB) ?
Which option do you recommend?
Then provide more details on what you're trying to accomplish or what specific issues you want to address. Generally speaking, vague questions result in vague responses. If you're not willing to put in the time required to ask a good question, why should anyone use up their time writing a detailed, "technical" response?
This article covers how to set up a simple load balancer on a DigitalOcean droplet with nginx. The tutorial covers setting up a round robin loadbalancer that can then direct site visitors to one of a set of IPs
If your going to go through the trouble of redundancy, spreading it out will give you more points of redundancy. Eventually there is going to be issues, it might be your doing, physical hardware problems, abusive neighbor on the same hardware, etc etc. The only way to ensure you stay up and running is to spread it out and remove as many single points of failure as possible.
Spreading it seems like an option to go, but notice two things:
1) when one droplet goes down, everything goes down - website cannot live properly without a database
2) having 4 droplets instead of one leads to wasting resources:
- droplet with database don't need transfer and do need CPU (so transfer is wasted and CPU is under heavy load)
- droplet for frontend needs a lot of transfer and very little CPU (CPU is wasted, there is too little transfer)
#1 shouldn't happen if you spread it out and correctly set it up so it can survive a variety of failures.
#2 is going to be your choice of what you are after and your budget to do it. If you want to be thrifty at the risk of your setup being down, then toss it all on 1 droplet. If you want to up no matter what, spread it out on droplets including multiple datacenters. Make a risk assessment about what your after and your budget to achieve that. Also "Wasted" resources as you put it, is room for growth.