1

We have built ourselves an API and are busy scaling it. At current we have 6 hosts and we use DNS Round Robin to spread the load.

However a lot of our traffic comes from single source. We plug into our client system so they use one source IP to contact us. We have carried out some testing on loader.io and I have seen uneven spread.

I know round robin might not be perfect but its better than what we were using before. HAProxy on another local box to manage it? I was thinking potentially having 2 load balancers with DNS FailOver to switch if one goes down.

UPDATE: Also we want to reduce network traffic. For example if HAProxy was asking which server was the least used this increases the response time. Could we forward the HTTP request straight to the host?

  • Do you have a requirement for affinity/stickiness for this client or clients generally? If so, no matter what mechanism you chose to balance you will wind up with hotspotting. – dmourati Jun 11 '13 at 18:49
  • thanks, so are you saying not to use DNS but rely on a proxy? Or are we wrong both ways. Also what do you mean by hotspotting. – Charlie Davies Jun 11 '13 at 19:09
  • Hotspotting is the consolidation of load on one of your 6 hosts. By creating a 1-to-1 map from client->host you are pretty much guaranteed to have imperfect balancing of the load. – dmourati Jun 11 '13 at 19:41

1 Answers1

1

If DNS load balancing doesn't work for you, then yes, a load balancer or an application proxy like haproxy is the next step.

longneck
  • 23,082
  • 4
  • 52
  • 86
  • Yup. DNS Round Robin isn't a (good) load balancing solution -- If you really need even load distribution to avoid saturation it's time to step up to something better. HAProxy and PFSense both offer some limited load balancing capabilities, or you can consider dedicated load balancer hardware. – voretaq7 Jun 11 '13 at 17:47