摘要 |
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. |
主权项 |
1. At a computer system including a router and a load balancing system, the load balancing system including a load balancer, one or more other load balancers, and a plurality of destination hosts, the router connected to a network and being a point of ingress into the load balancing system, components on the network using a virtual electronic address to communicate with the load balancing system, a method for sharing state between load balancers, the method comprising:
an act of the load balancer receiving a packet from the router, the packet containing source electronic address information identifying a source on the wide area network and destination electronic address information including the virtual electronic address; an act of the load balancer determining that the packet is for an existing data flow; an act of the load balancer using an algorithm to generate a data flow identifier for the existing data flow from the packet contents, including the packet headers; an act of load balancer determining that the load balancer lacks sufficient information to identify the destination host, from among the plurality of destination hosts, that corresponds to the existing data flow, including:
an act of the load balancer determining that the load balancer does not have any cached state mapping the existing data flow to one of the destination hosts in the plurality of destination hosts; in response to the determination that the load balancer lacks sufficient information to identify the destination host that corresponds to the existing data flow:
an act of the load balancer identifying an owner load balancer that is designated as the owner of the existing data flow, the owner load balancer selected from among the one or more other load balancers; andan act of the load balancer sending a request for data flow state information to the owner load balancer, wherein the act of the load balancer sending the request for data flow state information to the owner load balancer comprises an act of the load balancer sending the packet to the owner load balancer;an act of the load balancer receiving state information from the owner load balancer, the state information identifying the destination host that corresponds to the existing data flow; andan act of the load balancer caching the received state information.
|