Patent ID: 8447881

Claim:
Within a computer architecture, the computer architecture including a plurality of instances of an application and an application load balancer for the application, the application load balancing being part of the application, instances of the application running on machines in a farm of machines, a method for balancing the load for the application across the plurality of instances of the application, the method comprising: an act of the application load balancer receiving a first client initiated message directed to the application, the application load balancer being integrated as part of the application such that the application load balancer can access message content under the same security model as the application, the first client initiated message being the first message in a plurality of messages included in a message sequence; an act of the application load balancer assigning a specified identifier to the first client initiated message based on the characteristics of the first client initiated message, the specified identifier being inserted into the message; an act of the application load balancer determining that the specified identifier is not mapped to an instance of the application; an act of the application load balancer mapping the specified identifier to a specified instance of the application in accordance with a load balancing algorithm to balance the load for the application across the plurality of instances of the application; an act of the application load balancer sending the first client initiated message to the specified instance of the application; an act of the application load balancer receiving a second client initiated message included in the message sequence subsequent to receiving the first client initiated message; an act of the application load balancer assigning the specified identifier to the second client initiated message based on the characteristics of the second client initiated message; an act of the application load balancer correlating the second client initiated message with the first client initiated message based on the mapping of the specified identifier to the specified instance of the application; an act of the application load balancer sending the second client initiated message to the specified instance of the application in response to the correlation: subsequent to sending the second client initiated message to the specified instance of the application, an act of the application load balancer receiving a redirect exception from the specified instance of the application; and based on the redirect exception: an act of the application load balancer determining that an error occurred in assigning the specified identifier to the second client initiated message; an act of the application load balancer assigning a different identifier to the second client initiated message based on the characteristics of the second client initiated message; and an act of the application load balancer sending the second client initiated message to a different instance of the application.