Tech Dreams

Amazon ElastiCache Vs. Windows Azure AppFabric Cache

With cloud computing services, architecting a highly scalable and reliable applications is much easier than ever before. One of the main components of highly scalable architecture is Caching. A well cached application can boost performance by many folds depending on how effectively it is used.

For an ASP.NET web application cloud architecture, one can choose to use either Windows Azure AppFabric or Amazon AWS ElastiCache as a cache service provider. Lets looks at comparison chart of these two services from ASP.NET web application architecture perspective.

Windows Azure AppFabric AWS ElastiCache
Size 128MB – 4GB 1.3GB-63GB
Powered by Windows Server AppFabric Cache Memcached
API REST REST
Monthly Charges $45 onwards $68.4 onwards
Pricing $45-$325 per month $0.095-$0.76 per hour
ASP.NET Session State management Yes No
Libraries .NET Java,PHP,.NET,Ruby and Python
Regions Globally available Globally available
Topology Caches Cache Clusters and Cache Nodes
Configuration Limited Highly configurable

Advantages and disadvantages of using Azure AppFabric: It’s developed for ASP.NET applications and it gels well with Azure. With simple configuration in web.config files you would be able to store session and cache data in the Azure AppFabric. If your app is architected for Windows Azure, AppFabric is a good choice. Also if you are migrating a legacy application which uses the default cache management of ASP.NET, then migrating it to Azure AppFabric does not require any changes other than web.config modification.

The pricing, configuring and ability to scale for large cache instances that are more than 4 GB are pain points of AppFabric. At the first glance Windows Azure AppFabric price looks very attractive as the monthly charges starts from $45 for 128 MB cache. This is idle for a small web application.  But if your application needs cache anywhere close to 1 GB+ then Amazon AWS ElastiCache is the right choice: 1.3 GB of AWS ElastiCache costs $68.4 compared to 1 GB of Azure Cache cost $110.

Advantages and disadvantages of using AWS ElastiCache: Amazon is the pioneer of cloud computing and they are far ahead of their competitors. Amazon’s ElastiCache is powered by Memcached and its used by sites like Facebook, Twitter, Flickr, YouTube and many more. Do you need any further explanation on the advantages of underlying technology? I don’t think so. Its one of the robust cache service and highly configurable to match the needs of any architecture.

The price of ElastiCache is much cheaper than AppFabric and also it’s a truly pay for what you use model. You pay per hour basis for ElastiCache while you pay month for Azure AppFabric.

In general there are no disadvantages in using Memcached, but from an ASP.NET developer perspective Memcached does not have out of the box support for storing session state.

Further Reading

If you are interested to read more about Caching, Session statement for ASP.NET web applications here are few useful links