nginx load balancing

  • Posted January 24, 2013

Was reading over the nginx load balancing tutorial. And was just wondering, say I have 3 VPS’s and they are all serving pages. and I wanted to load balance the 3. Would I have to get another VPS to act as the controller/load balancer itself? Or can I throw nginx on one of those original 3 vps’s. And use that 1, to do both load balancing and serve pages?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

What should the size of a load balancer be? Is there a ‘rule of thumb’ or best practice you should use when selecting specs for the load balancer?

@marko.korhonen: You can choose any kind of droplet you want, whatever you prefer :]

Is there any recommendations what kind of droplet should be the load balancer vs. the web server ?

We need video tutorial

You would want to definitely split that off onto a separate virtual server. <br> <br>It will keep your configurations cleaner and you can make each of the web servers either managed through puppet with a base config or through a snapshot inside of the control panel. <br> <br>You want to segment services as much as possible and then size them appropriately since the work loads between them are so vastly different you will receive much more efficiency. <br> <br>For example splitting apart your web servers from your DB, and separating out your cache, allows better utilization of each because the underlying server is performing only function instead of switching back and forth.

You can use one droplet as a load balancer and a webserver, just add localhost to the upstream list. Bear in mind that having a separate load balancer is much more efficient.