Windows Azure AppFabric Caching

In case you haven’t heard, “the cloud” is a big deal and software development is shifting momentum from building purely focused desktop applications towards this paradigm (or some hybrid thereof). Performance in any application is important, none more so when dealing with web development. How many times have you waited 30 seconds or longer for a page to load? Exactly.

Caching has always been a key component in building extremely responsive applications/web sites so having that ability now built into Windows Azure is a huge benefit. There’s an abundant amount of documentation on this very topic via TechNet and MSDN but let’s quickly discuss the what, how and why of AppFabric’s caching service.

What is Windows Azure AppFabric Caching?

The Caching service is a distributed, in-memory cache that can be used to accelerate the performance and scale of your cloud applications built on Windows Azure and SQL Azure. Caching is often used to keep frequently queried data in-memory close to the application itself, which both reduces overhead on the database tier as well as eliminates unnecessary network latency.

How is Windows Azure AppFabric Caching used?

ASP.NET developers can use the Caching service without code changes, as pre-built session state and output caching providers enable you to activate with simple configuration changes. Caching capabilities are also directly available via a simple API for even more flexible and customized application use. At runtime, the Cache service transparently distributes ASP.NET session/output cache data or .NET objects stored in the cache across the elastic, scale-out infrastructure.

Why Implement Windows Azure AppFabric Caching?

Because it is delivered as a true service, AppFabric Caching has a very simple provisioning model – there is no complex infrastructure to install, setup or manage since this is done for you by the service itself. There are only two things to configure – what data to store and how large a cache do you need. As the needs of your application grow or shrink, you can dynamically change the size of the elastic cache based upon your needs.

Resources

The de facto standard is the Windows Azure site itself, but this link will provide additional information specifically related to the caching service as well as the official team blog. I’d also recommend viewing this demo video which gives a great walkthrough of provisioning the cache and consuming it within a project.

Summary

Creating highly scalable and robust applications have never been easy but developing for the cloud is. Cloud development is here so take advantage of the tools and added functionality it brings with it.