Highly scalable least connections load balancing
First Claim
Patent Images
1. A method for load balancing a plurality of servers, the method comprising:
- providing a plurality of control blocks, each control block associated with a number of active connections a server is connected with, the control block configured to control at least one server with the associated number of connections in a server list;
determining a metric for each server by dividing the number of connections on the server by the capacity of the server wherein the metric is kept as a quotient/remainder pair;
storing the quotient/remainder pair in the control block;
incrementing the remainder by one for every connection added to the server;
decrementing the remainder by one for every connection removed from the server;
causing each control block to point to a server with a lowest value of the metric;
selecting the control block associated with the least number of connections; and
selecting the server pointed to by the control block.
1 Assignment
0 Petitions
Accused Products
Abstract
A load balancing device according to an embodiment of the invention uses a predictor that comprises a plurality of Least Connections Control Blocks (LCCBs) that keeps track of the real servers with active connections. To speed up the search for the real server with the least number of active connections, an LCCB is kept for each metric. A metric is defined as the number of connections on a server divided by its weight (or capacity) of the server. This metric is kept as a quotient/remainder pair. The predictor sends out the real server address with the lowest metric whenever a new connection is required by the load balancing device.
216 Citations
19 Claims
-
1. A method for load balancing a plurality of servers, the method comprising:
-
providing a plurality of control blocks, each control block associated with a number of active connections a server is connected with, the control block configured to control at least one server with the associated number of connections in a server list; determining a metric for each server by dividing the number of connections on the server by the capacity of the server wherein the metric is kept as a quotient/remainder pair; storing the quotient/remainder pair in the control block; incrementing the remainder by one for every connection added to the server; decrementing the remainder by one for every connection removed from the server; causing each control block to point to a server with a lowest value of the metric; selecting the control block associated with the least number of connections; and selecting the server pointed to by the control block. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A computer readable medium comprising:
-
instructions for execution on a processor for the practice of a method for load balancing a plurality of servers, the method having the following steps, providing a plurality of control blocks, each control block associated with a number of active connections a server is connected with, the control block configured to control at least one server with the associated number of connections in a server list; determining a metric for each server by dividing the number of connections on the server by the capacity of the server, wherein the metric is kept as a quotient/remainder pair; storing the quotient/remainder pair in the control block; incrementing the remainder by one for every connection added to the server; decrementing the remainder by one for every connection removed from the server; causing each control block to point to a server with a lowest value of the metric; selecting the control block associated with the least number of connections; and selecting the server pointed to by the control block. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A load balancing apparatus comprising:
-
a plurality of control blocks, each control block associated with a number of active connections a server is connected with, the control block configured to control at least one server with the associated number of connections; a metric of the server, kept as a quotient/remainder pair, wherein the remainder is incremented by one for every connection added to the server, and the remainder is decremented by one for every connection removed from the server; a memory to store the quotient/remainder pair; a pointer in each control block that points to a server with a lowest value of the metric; and a selection circuit that selects the control block associated with the least number of connections and further selects the server pointed to by the control block. - View Dependent Claims (12, 13, 14, 15)
-
-
16. An apparatus for load balancing a plurality of servers, the apparatus comprising:
-
means for providing a plurality of control blocks, each control block associated with a number of active connections a server is connected with, the control block configured to control at least one server with the associated number of connections in a server list; means for determining a metric for each server by dividing the number of connections on the server by the capacity of the server, wherein the metric is kept as a quotient/remainder pair; means for storing the quotient/remainder pair in the control block; means for incrementing the remainder by one for every connection added to the server; means for decrementing the remainder by one for every connection removed from the server; means for causing each control block to point to a server with a lowest value of the metric; means for selecting the control block associated with the least number of connections; and means for selecting the server pointed to by the control block.
-
-
17. A method for load balancing a plurality of servers, the method comprising:
-
associating each of the plurality of servers with one of one or more control blocks, each control block representing a number of connections of the associated servers; determining a metric for each associated server by dividing the number of connections on the server by an assigned weight of the server, wherein the metric is kept as a quotient/remainder pair; storing the quotient/remainder pair in the control block; incrementing the remainder by one for every connection added to the server; decrementing the remainder by one for every connection removed from the server; pointing, within each control block, to a server with a lowest value of the metric; selecting the control block associated with the least number of connections; and selecting the server pointed to by the control block. - View Dependent Claims (18)
-
-
19. A system for load balancing a plurality of servers, the system comprising:
-
one or more clients to send client requests; and a virtual server to receive and process the client requests, the virtual server having, A) a plurality of real servers, and B) a load balancing apparatus to receive the client requests and load balance the client requests among the plurality of real servers, the load balancing apparatus further having, i) one or more control blocks, each of the plurality of real servers associated with one of one or more control blocks, each control block representing a number of connections of the associated servers, ii) a metric for each associated server, kept as a quotient/remainder pair, wherein the remainder is incremented by one for every connection added to the server and the remainder is decremented by one for every connection removed from the server, iii) a memory to store the quotient/remainder pair, iv) a pointer within each control block that points to a server with a lowest value of the metric, and v) a selection circuit that selects the control block associated with the least number of connections and further selects the server pointed to by the control block.
-
Specification