Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I only have two servers, both running nginx. What I can't figure out is how to load balance with just those. The tutorials I find are worded in a way that makes me think that I need a third server sitting in front of the two. Can anyone tell me how to make this work, or point me to something that will?

share|improve this question
up vote 1 down vote accepted

Even though the instructions you are seeing have a load balancing server with two nodes behind it on separate machines, you can double up on one box as the load balancer and 1 of the nodes.

nginx on port 80
web server of choice on port 5000

web server of choice on port 5000

All traffic requests hit ServerA on port 80, it in turn balances between the two web servers on ServerA and B.

This doesn't help you in terms of failover redundancy, you lose ServerA and everything goes away still, but does help regarding performance.

share|improve this answer
I've recently put just this system in place with two machines. – Alister Bulman Jul 24 '10 at 16:06

Round Robin DNS

share|improve this answer

I would say you either need a third (or some other type of load balancer, hardware or software) sitting in front or you need to split traffic between them via round robin dns or a similar method and then each can upstream proxy to the other if it's load is high, or whatever method you use to balance.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.