concept AppFabric in category asp.net

This is an excerpt from Manning's book ASP.NET 4.0 in Practice.
When we were writing this book, Windows Server AppFabric was released in version 1. AppFabric is a distributed caching engine that consists of a set of features that can support cache sharing across multiple, different servers. Because session state is a form of cache, you can use AppFabric in this scenario, too. You can use it so that the same session state is synchronized across different web servers in the same cluster (even geographically, if you need to go that far).
This tip is important for dealing with out-of-process providers, when an item saved in cache must be serializable. A serializable item can not only be copied in memory, but can also be transmitted across the wire. If you’re planning to switch sometime to an out-of-process provider, you’ll want to remember this advice. Because you can choose the caching provider at the runtime stage in ASP.NET 4.0, serializable items let you transparently move from an in-process strategy, such as the standard ASP.NET Cache, to an enterprise cache server, like AppFabric, by building your own provider.
AppFabric caching is a fully distributed cache engine that supports cache regions, balancing items across the nodes, and so on. Read more about AppFabric caching on http://www.mng.bz/sxza. You can install it on Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2. Best of all, it’s free of charge. You can see how it works in figure 14.10.
Figure 14.10. When an item is added to the cache, AppFabric caching automatically balances it across the cluster’s nodes. When retrieved, the object can be sent from any server in the cluster.
![]()
We’re going to use AppFabric caching in this section because it’s gaining a lot in popularity. If you don’t have it installed already, you can do so quickly from Microsoft Web Platform Installer. AppFabric caching works as a single node cluster, which is useful for you to test its behavior before moving to production. Unfortunately, its administration is possible only via a command prompt (based on PowerShell) or API. An official graphical interface doesn’t exist, but the commands to start and query the engine status are simple and are highlighted in MSDN.