Claims
- 1. In a computer network including an encapsulated cluster of nodes, an affinity-based method for routing client requests to one of a plurality of server nodes in the cluster, said method comprising the steps of:
communicating from the client to a router node, one or more packets associated with a client request; and routing the packets to a preferred server having affinity with the client according to state information maintained by the router.
- 2. The method of claim 1, wherein the state information includes information on at least one previous request to one of the server nodes, said step of routing further comprising the steps of:
determining from the state information if one of the packets is associated with a previous request; and if one of the packets is associated with a previous request, routing the request to one of the server nodes associated with the previous request; and if none of the packets are associated with a previous request, creating and storing by the router, state information associated with the new request.
- 3. In a computer network including an encapsulated cluster of nodes, an affinity-based method for routing client requests to one of a plurality of server nodes in the cluster, said method comprising the steps of:
communicating from the client to a router node, one or more packets associated with a request; routing the packets to a server node in said encapsulated cluster; and said server communicating to the router information for a start of an affinity requirement wherein one or more subsequent requests for the client are routed to a server belonging to a set S associated with the affinity requirement.
- 4. The method of claim 1, wherein the router includes an affinity table for associating one or more client requests with one or more preferred server nodes, the table including one or more affinity records, each record including one or more preferred server node identifiers, one or more client addresses and one or more affinity indices, and wherein the client request includes one or more affinity indices and wherein said step of routing the packets to a preferred server further comprises the steps of:
determining if there is an affinity record having a matching client address and matching affinity index for the client request; and if such an affinity record is found, communicating the client request to a server node identified in said affinity record.
- 5. The method of claim 1, wherein said step of routing depends on one or both of a static state and a dynamic state at the server nodes, and wherein the network address of the router is provided to the client, further comprising the steps of:
(i) selecting a preferred server node to service the client request; (ii) creating an affinity record including the client address, an identifier for the preferred server node, and the time at which the affinity record was created; and (iii) sending the client request to the preferred server node, such that responses from the preferred server node go directly to the client.
- 6. The method of claim 5, wherein the affinity record further includes a time stamp associated with one or more of the client requests for the creation or modification of the affinity record, the method further comprising the steps of:
identifying an affinity record with a matching client address wherein the difference between the current time and the affinity record time stamp is less than a predetermined threshold; and sending the client request to a server node indicated in an identified affinity record.
- 7. The method of claim 1, wherein the router is a TCP-router.
- 8. The method of claim 1, further comprising the steps of:
a server S determining that the client requests should be serviced by a server belonging to a particular set of one or more server nodes; and said server S causing the state information maintained by the router to be modified, enabling one or more subsequent requests from the client to be routed to a server belonging to said set of one or more server nodes.
- 9. The method of claim 1, wherein the encapsulated cluster includes a database partitioned across a plurality of the nodes, further comprising the steps of:
routing one or more packets associated with a request for which the router does not have affinity information, to a server node S in the encapsulated cluster; said server S determining the preferred server to process requests from said client based on a database partitioning; and said server S causing the state information maintained by the router to be modified, enabling one or more subsequent requests from the client to be routed to the preferred server.
- 10. In a multi-node server environment wherein client requests can be satisfied by routing a client request to a subset of the servers and wherein one or a subset of the servers may be preferred for handling a request from a client, a preference based on one or both of static and dynamic state at the servers, wherein a client request has an associated affinity index, wherein a node is designated as a router and wherein the network address of the router is given out to clients, a method for the router to send client requests to a server node, said method comprising the steps of:
(a) determining if there is an affinity record for the said client and said affinity index, and if there is no affinity record, performing the additional steps of:
(i) selecting one of said server nodes to service the client request; (ii) creating an affinity record containing the client address, the server node selected to handle the request; and (iii) sending the request to the selected server node, such that responses from the server go directly to the client.
- 11. The method of claim 10, wherein the affinity record includes one or more of the affinity index and the time at which the affinity record was created.
- 12. The method of claim 10, wherein the router is a TCP-router.
- 13. The method of claim 1, wherein the client request includes one or more affinity indices, and wherein said step of routing the packets to a preferred server further comprises the step of identifying the preferred server from an address of the client communicating to the router and the one or more affinity indices included with the client request.
- 14. The method of claim 3, further comprising the step of:
communicating to the router, information for an end of affinity requirement, wherein one or more subsequent requests for the client are not routed to a server belonging to said set S.
- 15. The method of claim 4, wherein the client request includes multiple affinity indices, and said determining if there is an affinity record, further comprises the step of:
comparing the affinity indices associated with the client request with at least one set of affinity indices associated with the affinity record.
- 16. The method of claim 8, wherein said server S is the preferred server.
- 17. The method of claim 14, further comprising the step of terminating the affinity requirement by deleting information maintained by the router for said affinity requirement.
- 18. A program storage device readable by a machine, tangibly embodying a program of instructions executable by the machine to perform method steps for an affinity-based method of routing client requests to one of a plurality of server nodes in an encapsulated cluster of nodes in a computer network as claimed in any of claims 1-9 or 13-17.
- 19. A program storage device readable by a machine, tangibly embodying a program of instructions executable by the machine to perform method steps for an affinity-based method of routing client requests to one of a plurality of server nodes in an encapsulated cluster of nodes in a computer network as claimed in any of claims 10-12.
CROSS-REFERENCE TO RELATED PATENTS AND PATENT APPLICATIONS
[0001] The present invention claims priority to co-pending U.S. Provisional Patent application Serial No. 60/033,833, filed Dec. 23, 1996.
[0002] The present invention is related to co-pending U.S. patent application Ser. No. 701,939, filed Aug. 23, 1996, entitled “Weighted TCP Routing to Service Nodes in a Virtual Encapsulated Cluster” by C. Attanasio, G. Hunt, G. Goldszmidt, and S. Smith (IBM Docket No. Y0996167); and U.S. Pat. No. 5,371,852, issued Dec. 6, 1994, entitled “Method and Apparatus for Making a Cluster of Computers Appear as a Single Host”, by Attanasio et al. The present invention has a common assignee with this co-pending patent application and U.S. patent which are hereby incorporated by reference in their entirety.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60033833 |
Dec 1996 |
US |