|
All the load distribution techniques discussed in this book rely, on one level or another, on using multiple copies of an appserver and arranging for multiple consecutive requests from various clients to be serviced by different servers.
If each client request is completely independent of every other client request, then it does not matter whether two requests are processed on the same server. However, in practice, there are many situations where all requests from an individual client are not totally independent. In many usage scenarios, a client makes one request, waits for the result, then makes one or more subsequent requests that depend upon the results received from the earlier requests.
Such a sequence of operations on behalf of one client falls into one of two categories:
Again, in the case of stateless interactions, it does not matter if different requests are being processed by different servers. However, in the case of stateful interactions, we must ensure that whichever server is processing a request has access to the state information necessary to service that request. This can be ensured either by arranging for the same server to process all the client requests associated with the same state information, or by arranging for that state information to be shared and equally accessible by all servers that might require it. In that last case, it is often advantageous to arrange for most accesses to the shared state to be performed from the same server, so as to minimize the communications overhead associated with accessing the shared state from multiple servers.