Question

NGINX as load balancer question

Hello all,

I am thinking about splitting my single machine setup into multiple machines. I am thinking of using a NGINX as a load balancer in front of my main PHP+NGINX machines. However, I am not sure how many cores and ram to put on my load balancing node. When my NGINX with PHP is processing the requests, it uses the cpu a lot but I am not sure if this is the same case when NGINX is as a load balancer. My question is, how power hungry is NGINX when the only job it does is load balancing ?

Thanks in advance!


Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Nginx running as a load balancer will use a lot less resources than a LEMP stack serving a site. In most cases, because network throughput is the same for all plans you can safely go with the smallest droplet (1GB RAM) for your load balancer. Should you see resource use increasing as your site scales you can resize to a larger plan in the time it takes to reboot your droplet.