Is it possible to effectively balance the load of multiple websites on a single droplet?

September 15, 2014 1.1k views

Currently, our company offers bus website content management systems that work remotely. We set up our software on the bus company's rented server and then it communicates with our server via a remote API. The setup mainly revolves around CORS etc.

We have realised that this was a bad idea, as their small nasty shared servers are often hosted somewhere on the other side of the world, and when their site hits problems we're the ones to blame.

To combat this, we've decided to expand our CMS into a full hosting service. This means, it would just be a single job for the operator, and that's to point their domain in the right direction.

Being a business, it's obviously important that we keep a count on who's paying for super hosting, and who's not paying for super hosting.

Currently, we have a single droplet. The site content is all pulled from the same folder on our server, we use rewrite rules to work out which site it is and then serve the correct branding, content, images etc. What this all boils down to is... how can I set up a maintainable system in which every company that wants to use our software on our server is treated equally?

Ideally I'd like and to be on different droplets. That way if there is too much traffic they won't affect each other. Does this make sense? If someone could just offer an insight into how to get started with this I'd highly appreciate it.


2 Answers

Take a look at statistic tool ngxtop
It would let you see sites usage statistics (nginx,apache) and act accordingly.

see more on load balancing of nginx

by Etel Sverdlov
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

Ideally, one droplet for each website. Easier to manage and each website has own resources.

But, you'll need to use subdomain ( point to each droplet, instead of folder ( for each website.

Have another answer? Share your knowledge.