1

I need to provision machines as a load balancer (probably using HAProxy), now the question is

  • Does a machine with 512MB/2CPU cores suffice?
  • Is load balancing more RAM or CPU intensive (or both)?
  • What's a good configuration for a LB machine?

1 Answer 1

8

In the tradition of my people, I'm going to have to answer your question with a question of my own: Load balancing what, and how much?

Load balancing is usually more CPU intensive than it is RAM intensive, but it is by no means a simple one-or-the-other deal. Many different factors play into the performance requirements of the machine - everything from the amount of traffic, the length of the states, the kind of requests, the load balancing algorithm - all of these have vastly different requirements. Round-robin is one of the simplest algorithms for balancing, and requires little more than the I/O switching necessary to do so, but as you add more complex algorithms like sticky-cookie or least-connections, memory usage will rise, and as you add redirection rules, the load balancing software will have to increase the amount of work that it does.

I can't answer any of your three questions directly without a lot more information, but, in general, the following applies: HAProxy is extremely fast, and for almost anything you are going to be doing, you are likely not going to come close to hitting the limits of any modern machine's capacity doing simple load balancing until you get up into the range of 10s and 100s of thousands of simultaneous tracked connections.

You must log in to answer this question.