I can't figure out how a load balancer works. Say for example on Rackspace cloud servers.

  1. You have one instance with all your stuff
  2. Do you clone that instance, so there are really two identical copies of it?
  3. Then you get a static IP from the load balancer, and that goes to one of the two instances (which are really the same)

Is that right? Where do I figure out more of this?

link|improve this question
It sounds like you're asking how distributed services work, more than how load balancing works. – Flimzy Aug 21 '11 at 21:09
feedback

migrated from stackoverflow.com Aug 21 '11 at 21:08

This question came from our site for professional and enthusiast programmers.

closed as not constructive by Shane Madden, John Gardeniers, womble, Chris S, MadHatter Aug 22 '11 at 6:25

This question is not a good fit to our Q&A format. We expect answers to generally involve facts, references, or specific expertise; this question will likely solicit opinion, debate, arguments, polling, or extended discussion. See the FAQ for guidance on how to improve it.

3 Answers

Load balancing distributes the load onto the two instances you have. Therefore one instance isn't handling all of the work.

  1. You setup a load balancer with Rackspace.
  2. You receive a static IP from the load balancer.
  3. You point your website's DNS to the load balancer's static IP.
  4. The load balancer redirects traffic equally to the two instances.
link|improve this answer
feedback

It depends on your setup. However, the basic load balancing setup includes a single database server. In the Django Book, in the chapter about Deploying Django, there is a simple diagram that illustrates a basic load balancing configuration.

Load balancing with Django

Basically, the computers that generate web pages all share the same database, which is stored on a dedicated server. Media files (e.g. CSS and images) may be stored on the same server or on a separate, dedicated media server, although this role may be performed by the load balancer itself.

However, in advanced setups aiming really high traffic or a lot of static content, you might want to serve static files on several different media servers. Finally, you may want to have a distributed database setup, but this introduces a whole new class of problems, and that is really a different topic (e.g. you can have a distributed database without using a load balancer).

link|improve this answer
feedback

There are multiple implementations of load balancing, each with their own approach that yields specific advantages based on their specializations.

  1. There is typically some shared or common data inter-relating the nodes (data, user information, etc.)
  2. That depends on the architecture of the application, whether it is stateful (storing data) or stateless (passing data through), there is typically common code-based shared across the nodes (which is basically "cloned" across the nodes)
  3. IP assignments is typically not managed through a load balancer, but the IP configurations is usually an intimate part of its configuration (as each networked component/device will require its own IP address)

In order to understand the specifics of an implementation, the implementation itself needs to be identified.

link|improve this answer
feedback

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