Patent ID: 8391295

Claim:
A computer-implemented method for distributing requests, the method comprising: a coordinator within a database server cluster (a) developing advice as to whether affinity-based routing would benefit a service at a node in the database server cluster and (b) posting the advice to one or more middle-tier servers that send requests to and receive responses from database servers in the database server cluster; determining whether a potential gain in performance in the database server cluster can be achieved by using affinity-based routing in the database server cluster; in response to determining that a potential gain in performance in the database server cluster can be achieved by using affinity-based routing in the database server cluster, recommending, in the advice, to distribute requests to nodes in the database server cluster to preserve client-to-node affinity for requests from the same client; after recommending, collating performance characteristics of the database server cluster; based on collating the performance characteristics, measuring a potential loss in performance in the database server cluster; in response to measuring a potential loss in performance in the database server cluster, removing the advice to distribute requests to nodes in the database server cluster to preserve client-to-node-affinity; and wherein the method is performed by one or more computing devices.