Synchronizing state among load balancer components
First Claim
1. One or more computer hardware storage device having stored computer-executable instructions which, when executed by at least one computer hardware processor, cause a load balancer to implement a method that includes the following:
- monitoring a plurality of destination hosts for changes in an arrangement of the plurality of destination hosts;
maintaining a destination host array that maps flow identifiers to destination hosts;
prior to each array update, copying the destination host array to an old version of the destination host array;
updating the destination host array at periodic intervals;
providing the destination host array and the old version of the destination host array to a plurality of muxes;
monitoring the plurality of muxes for changes;
maintaining a primary ownership array mapping the flow identifiers to primary owner muxes;
maintain a backup ownership array mapping the flow identifiers to backup owner muxes;
providing the primary ownership array and the backup ownership array to the plurality of muxes;
wherein each of the plurality of muxes is configured for;
receiving packets from a router;
formulating a flow identifier for each received packet based on information contained in the packet;
identifying an appropriate destination host, from among the plurality of destination hosts, for the packet; and
sending the packet to identified appropriate destination host.
2 Assignments
0 Petitions
Accused Products
Abstract
The present invention extends to methods, systems, and computer program products for synchronizing state among load balancer components. Embodiments of the invention include load balancers using a consistent hashing algorithm to decide how new connections should be load balanced. Use of consistent hashing algorithm permits load balancers to work in a stateless manner in steady state. Load balancers start keeping flow state information (destination address for a given flow) about incoming packets when it is needed, i.e. such as, for example, when a change in destination host configuration is detected. State information is shared across load balancers in a deterministic way, which allows knowing which load balancer is authoritative (e.g., is the owner) for a given flow. Each load balancer can reach the authoritative load balancer to learn about a flow that cannot be determined locally.
76 Citations
20 Claims
-
1. One or more computer hardware storage device having stored computer-executable instructions which, when executed by at least one computer hardware processor, cause a load balancer to implement a method that includes the following:
-
monitoring a plurality of destination hosts for changes in an arrangement of the plurality of destination hosts; maintaining a destination host array that maps flow identifiers to destination hosts; prior to each array update, copying the destination host array to an old version of the destination host array; updating the destination host array at periodic intervals; providing the destination host array and the old version of the destination host array to a plurality of muxes; monitoring the plurality of muxes for changes; maintaining a primary ownership array mapping the flow identifiers to primary owner muxes; maintain a backup ownership array mapping the flow identifiers to backup owner muxes; providing the primary ownership array and the backup ownership array to the plurality of muxes; wherein each of the plurality of muxes is configured for; receiving packets from a router; formulating a flow identifier for each received packet based on information contained in the packet; identifying an appropriate destination host, from among the plurality of destination hosts, for the packet; and sending the packet to identified appropriate destination host. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A load balancing system, comprising:
-
one or more processors; system memory; a router; and one or more computer storage devices having stored thereon computer-executable instructions representing a load balancing manager, a plurality of muxes, and a plurality of destination hosts, wherein the load balancer is configured to; monitor the plurality of destination hosts for changes in the arrangement of the plurality of destination hosts; maintain an destination host array mapping flow identifiers to destination hosts; prior to each array update, copy the destination host array to an old version of the destination host array; update the destination host array at periodic intervals; provide the destination host array and the old version of the destination host array to the plurality of muxes; monitor the plurality of muxes for changes; maintain a primary ownership array mapping flow identifiers to primary owner muxes; maintain a backup ownership array mapping flow identifiers to backup owner muxes; provide the primary ownership array and the backup ownership array to the plurality of muxes; and wherein each of the plurality of muxes are configured to; receive packets from a router; formulate a flow identifier for each received packet based on information contained in the packet; identify an appropriate destination host, from among the plurality of destination hosts, for the packet, including; determining if a data flow associated with the packet is a new data flow; when the data flow is determined to be an existing data flow, using the flow identifier as an index into the destination host array to identify the appropriate destination host for the packet; when the contents of the destination host array and the old version of the destination host array do not match, referring to cached state to identify the appropriate destination host for the packet, including; referring to cached state at the mux to determine if the mux previously cached an indication of the appropriate destination host for flow identifier, including;
when the cached state at the mux contains an indication of the appropriate destination host for flow identifier, accessing the cached state at the mux; and
when the cached state at the mux does not contain the appropriate destination host for flow identifier,
referring to an owner array to identify an owner mux for the flow identifier;
querying the identified owner mux for cached state; and
receiving cached state, indicating the appropriate destination host for the flow identifier, from the identified owner mux; andsend the packet to identified appropriate destination host. - View Dependent Claims (8, 9, 10, 11)
-
-
12. A computer-implemented method that includes the following being implemented by one or more computing systems:
-
monitoring a plurality of destination hosts for changes in an arrangement of the plurality of destination hosts; maintaining a destination host array that maps flow identifiers to destination hosts; prior to each array update, copying the destination host array to an old version of the destination host array; updating the destination host array at periodic intervals; providing the destination host array and the old version of the destination host array to a plurality of muxes; monitoring the plurality of muxes for changes; maintaining a primary ownership array mapping the flow identifiers to primary owner muxes; maintain a backup ownership array mapping the flow identifiers to backup owner muxes; and providing the primary ownership array and the backup ownership array to the plurality of muxes. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20)
-
Specification