Load Balancing for Network Servers

From Computing and Software Wiki

(Difference between revisions)
Jump to: navigation, search
m (References)
(Effects of Load Balancing)
Line 2: Line 2:
==Effects of Load Balancing==
==Effects of Load Balancing==
-
===Pros===
+
Load balancing is motivated by the need to distribute load across enough resources to service network requests.  It can be used to ease network traffic by routing requests to various destination hosts, to make use of the increased computing power available in multiple hosts, or to increase storage capacity by allowing the use of more than one host.  These three problems can frequently go hand-in-hand and effective load balancing can solve all three.
-
===Cons===
+
 +
===Common Scenarios===
 +
Load balancing is used in many network-related application but perhaps its best-documented use is in web applications.  Web sites generally use servers with consumer hardware, since more powerful computers (such as supercomputers) are extremely expensive, and many of the issues involved with using (relatively) cheap hardware have been solved with increased research in distributed computing, of which load balancing is a part.  Extremely popular websites such as Google, Slashdot, or Facebook each field hundreds (if not thousands) of requests per seconds, and having a single server servicing these requests is simply untenable.  Bandwidth, compute power, and storage are all bottlenecks here.  Even if enough bandwidth was available a single server would not have enough RAM to service the overhead involved in using TCP connections.
 +
 +
Large websites frequently use load balancing in three ways:
 +
 +
#Offloading bandwidth-intensive content such as images, video, and other media to '''Content Delivery Networks''' or '''CDNs''', discussed briefly below.
 +
#Redirecting a request to a server that is physically close to the user and/or is not at its load capacity
 +
#Storing databases in segments on different servers.  There can be heuristics to determine which parts of each database are stored on which server, or they can be randomly distributed.  The idea is to reduce the number of requests that come to each database.
==Methods of Load Balancing==
==Methods of Load Balancing==

Revision as of 18:28, 12 April 2009

Load balancing refers to methods used to distribute network traffic amongst multiple hosts. This can be done by having different hosts used for different tasks (for example, separate servers for image and text content for a website) or by using a pool of redundant servers from which a load balancer can choose a single host to use for a given connection. Load balancing is usually achieved transparently to the client—that is, the service requested by the client appears to come from one place, even though it may be coming from multiple servers or a server at a different IP address.

Contents

Effects of Load Balancing

Load balancing is motivated by the need to distribute load across enough resources to service network requests. It can be used to ease network traffic by routing requests to various destination hosts, to make use of the increased computing power available in multiple hosts, or to increase storage capacity by allowing the use of more than one host. These three problems can frequently go hand-in-hand and effective load balancing can solve all three.

Common Scenarios

Load balancing is used in many network-related application but perhaps its best-documented use is in web applications. Web sites generally use servers with consumer hardware, since more powerful computers (such as supercomputers) are extremely expensive, and many of the issues involved with using (relatively) cheap hardware have been solved with increased research in distributed computing, of which load balancing is a part. Extremely popular websites such as Google, Slashdot, or Facebook each field hundreds (if not thousands) of requests per seconds, and having a single server servicing these requests is simply untenable. Bandwidth, compute power, and storage are all bottlenecks here. Even if enough bandwidth was available a single server would not have enough RAM to service the overhead involved in using TCP connections.

Large websites frequently use load balancing in three ways:

  1. Offloading bandwidth-intensive content such as images, video, and other media to Content Delivery Networks or CDNs, discussed briefly below.
  2. Redirecting a request to a server that is physically close to the user and/or is not at its load capacity
  3. Storing databases in segments on different servers. There can be heuristics to determine which parts of each database are stored on which server, or they can be randomly distributed. The idea is to reduce the number of requests that come to each database.

Methods of Load Balancing

Dividing Servers Based On Use

Multiple Redundant Servers

Traditional Load Balancing

Optimizing the Return Trip

Caching

Case Study: Facebook's Photo System

See Also

Content delivery network

References

  1. Tony Bourke: Server Load Balancing, O'Reilly, ISBN 0-596-00050-2
  2. Matthew Syme, Philip Goldie: Optimizing network performance with content switching, Prentice Hall PTR, ISBN 0-13-101468-4
  3. Jason Sobel: Needle in a Haystack: Efficient Storage of Billions of Photos
  4. Aditya Agarwal: Facebook: Science and the Social Graph
Personal tools