10

in a web application and service I'm creating it's necessary that it scales horizontally. I want to have 1 load balancer, 3 web server nodes, and 2 database nodes (one will be solely for redundancy and will scale vertically as soon as the first db node goes down).

  1. Does the load balancer act as a proxy?
  2. If so doesn't that defeat the purpose of scaling horizontally if it's going to be a massive bottle-neck?
  3. Should it have significantly more resources than the web server nodes?
User2013
  • 389
  • 1
  • 6
  • 19
  • What solution did you go for eventually load balancer , or anything else ? – Ahmed Oct 25 '19 at 08:28
  • I have implemented many load balancers in the (nearly) 6 years since this question was asked, and have never experienced a situation where the load balancer was a bottleneck. – User2013 Oct 30 '19 at 04:23
  • What is the bandwidth (generally) for a load balancer since I believe all the traffic goes through it – Ahmed Oct 30 '19 at 10:53

1 Answers1

12

[I think you meant "scales horizontally" in your first sentence.]

  1. Yes, typical load balancers are proxys.
  2. The load balancer will be a bottleneck if your load is network bound. Usually load is CPU bound so the load balancer distributes the CPU load, not the network load.
  3. No. load balancers don't need many resources since they don't hold or process much data. It should have as much network resources (bandwidth) as possible however.
Ted Bigham
  • 4,237
  • 1
  • 26
  • 31
  • Yes I did mean 'scales horizontally', my mistake. Thanks for your answer – User2013 Jan 23 '14 at 06:50
  • 1
    @TedBigham, for situations where the load is network bound, what's a typical recourse? Is round-robin dns a viable one? – Tung Mar 16 '17 at 21:50
  • @Tung Round-Robin DNS is viable for short lived connections. If connections stay open for a long time (websockets), I'd use a "pre-auth" service that clients hit before logging in. Have it return the address of the least busy endpoint. – Ted Bigham Mar 20 '17 at 16:43