The present invention relates generally to electrical computers and digital processing systems, and specifically to multicomputer data transferring between a client and a server based upon the application server's reliability.
Web applications are deployed with a tiered architecture as shown in the example of
The tiered architecture is transparent to the client running web applications on the application servers. From the client's perspective, web applications appear to run on the web server, not on the application server. A tiered architecture provides advantages over an architecture that allows direct access to applications from the Internet. For example, the web server can act as a security gateway to limit access to the application servers and can allocate client requests across the application servers to balance the load between each application server.
But failures can happen to the communication link between the web server and the application servers such as a power failure, network failure or shutdown of the application server. Two failure modes can affect a client accessing an application through the web server. The first failure mode occurs when the connection between web server and application server fails after data is partially read from the client. The second failure mode occurs when the connection between web server and application server fails after data is partially written to the client. In either case, the client's request and the application server's response are interrupted.
When a first application server fails while handling a client request, the pending client request should not be affected, because the pending client request should fail-over to a second server, which should respond to the request in the same manner as the first server. The fail-over procedure should be transparent to the client. Using an Autonomic manager on the web server is known in the art for performing the fail-over function. Autonomic managers cache session information for the fail-over function. The cache can contain a copy of all client requests and the application responses. When a first application server fails during a client session, the autonomic manager uses the cache to restore the session on a second server. The interrupted transmission of the request or response is repeated at the second server, which responds in the same manner as the first application server would have responded if the failure had not occurred.
Autonomic managers perform many other functions on web servers, including: assigning all client sessions to specific application servers, monitoring session and server status, collecting statistics on server performance, and load balancing sessions across all the application servers. One example of an autonomic manager that performs these functions is the Enterprise Workload Management agent (“eWLM”) from IBM.
High availability of web applications is improved by caching all requests and responses passing through the web server. Caching every client request and server response, however, consumes both persistent and volatile memory, processor time and bandwidth. One improvement known in the art is to only cache the client requests and the status of the application server's response. In this scenario, if the application server fails, the fail-over server can pick-up where the failed server left off. But caching client requests and application server response status consumes resources.
High availability and resource utilization can also be improved by caching client requests to historically unreliable application servers, but not caching client requests to historically reliable application servers. A need exists for determining the reliability of an application server, and assigning resources for caching client requests based on the reliability of the application server.
These and other objects of the invention will be apparent to those skilled in the art from the following detailed description of a preferred embodiment of the invention.
The Intelligent Caching Tool uses a predictive model to determine which application servers are unreliable, requiring cached client requests. The Intelligent Caching Tool collects reliability statistics for the application server and builds a Hidden Markov Model using the reliability statistics. Using the Hidden Markov Model, the Intelligent Caching Tool calculates a reliability index for the application server. After setting a user defined reliability threshold, the Intelligent Caching Tool caches all client requests and the status of the application server's response when the reliability index is below the reliability threshold.
One embodiment of the Intelligent Caching Tool allocates cache space on a sliding scale based on the applications server's reliability. In this embodiment, no cache is used for highly reliable application servers. All client requests and the status of the application server's response are cached for low reliability application servers. Partially reliable application servers are allocated a variable amount of cache space based on the reliability index. A FIFO (“First In, First Out”) method is used to remove the oldest requests from a cache that has reached the allocated size limit. In all cases, once a client/server session terminates, all requests associated with the terminated session are deleted from the cache.
A special case exists for client/server sessions that involve streaming media, also known as “re-playable cache.” Once the media stream starts, the cached client requests are no longer needed, even though the client/server session remains active. The Intelligent Caching Tool identifies a “commit point” or other operational boundary after which previously cached client requests in the session may be deleted. An operational boundary may include a specific command or event, such as starting the media stream download or transferring a megabyte of data.
The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, as well as a preferred mode of use, further objectives and advantages thereof, will be understood best by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:
The principles of the present invention are applicable to a variety of computer hardware and software configurations. The term “computer hardware” or “hardware,” as used herein, refers to any machine or apparatus that is capable of accepting, performing logic operations on, storing, or displaying data, and includes without limitation processors and memory; the term “computer software” or “software,” refers to any set of instructions operable to cause computer hardware to perform an operation. A “computer,” as that term is used herein, includes without limitation any useful combination of hardware and software, and a “computer program” or “program” includes without limitation any software operable to cause computer hardware to accept, perform logic operations on, store, or display data. A computer program may, and often is, comprised of a plurality of smaller programming units, including without limitation subroutines, modules, functions, methods, and procedures. Thus, the functions of the present invention may be distributed among a plurality of computers and computer programs. The invention is described best, though, as a single computer program that configures and enables one or more general-purpose computers to implement the novel aspects of the invention. For illustrative purposes, the inventive computer program will be referred to as the “Intelligent Caching Tool”
Additionally, the Intelligent Caching Tool is described below with reference to an exemplary network of hardware devices, as depicted in
Intelligent Caching Tool 300 typically is stored in a memory, represented schematically as memory 320 in
Configuration component 400 starts (410) when initiated by a systems manager or other user of a web server as seen in
The user can select either simple or variable cache types. The simple cache type caches all client requests and application server response status indicators for active sessions on application servers that have a reliability index below the upper reliability threshold. Only the upper reliability threshold is set for the simple cache type. The variable cache type allocates a variable amount of cache for partially reliable application servers, based on the reliability index. An upper reliability threshold and lower reliability threshold is set for the variable cache type. When using a variable cache type, and application server with a reliability index below the lower reliability threshold will cache all client requests and application server reply status indicators for active sessions. A variable amount of cache is reserved for application servers with a reliability index between the lower reliability threshold and upper reliability threshold. No cache is used for application servers with a reliability index above the upper reliability threshold for either cache type.
Configuration component 400 reads the cache type and reliability thresholds and saves them to configuration file 350 (424). If the user selected a variable cache type (426), the user must also set the cache size limit for partially reliable application servers (428). Configuration component 400 reads the cache size limit and saves it to configuration file 350 (430). If the user wants to change commit point settings for streaming media sessions (432), configuration component 400 reads the setting change and saves it to configuration file 350 (434). If the user makes no more changes (436), configuration component 400 stops (438).
HMM Analyzer 500, as shown in
Cache monitoring component 700 starts whenever configuration component 400 designates use of variable cache, as shown in
A preferred form of the invention has been shown in the drawings and described above, but variations in the preferred form will be apparent to those skilled in the art. The preceding description is for illustration purposes only, and the invention should not be construed as limited to the specific form shown and described. The scope of the invention should be limited only by the language of the following claims.