Figure: An ASP.NET application can use AppFabric Caching Services to store Session object data.
This simple scenario begins with the user supplying some information that the ASP.NET application stores in the Session object for this user (step 1). The Web server that handles this request has been configured to cache Session objects in an AppFabric Caching Services cluster, and so the user’s data is written to one or more cache servers (step 2). The next request from this user relies on the data supplied in step 1, but it’s handled by a different Web server (step 3). The ASP.NET code on this Web server refers to the same Session object, which transparently accesses the cache cluster to retrieve the data (step 4). This makes the information provided in step 1 available to the application once again. Notice that there’s no need to access the application database here, since the Session object wasn’t stored there, nor must the user access the same Web server instance for each request. The result is an ASP.NET application with better performance and improved scalability.