Redis Alternatives Open Source Distributed Cache

Redis is an in-memory key value store developed in C/C++ with clients for various programming languages like .NET, Java and C. Redis has features to tackle critical issues but falls short in some fundamental aspects. NCache – a .NET distributed caching solution on the other hand when compared with Redis answers all these concerns effectively and also provides additional features that are absent in Redis making it an ideal replacement.

The demand for high speed data access along with its integrity and fault tolerance is ever increasing in the contemporary application arena. Traditional disk based RDBMS systems have failed to answer these concerns in a comprehensive manner. This paved way for in-memory data solutions that cover all the bases listed above.

Here’s why you want to use NCache as an alternative to Redis.

1 – WAN Replication

First and the foremost Redis has no support for WAN replication of the cached data. The need for this feature becomes indispensable when your application is deployed in multiple data centers across the country or world. NCache provides powerful WAN replication capability for its distributed cache in the following data center configurations:

  •        Active – Passive
  •        Active – Active

The first situation is suitable when you have an active data center and a disaster recovery backup data center. The backup data center only becomes active if the active one goes down. And, for this to be possible, the distributed cache must be replicated to the passive data center so it is available when the data center becomes active.

The second situation is applicable where you have two active data centers serving geographically dispersed users so as to improve their access time. And, you want the ability to either reroute some of the traffic from one data center to another in case of overflow. Or, one of the data centers goes down and you want to route all its traffic to the other one.

In this second case, you need the distributed cache updates from both data centers to be replicated to the other ones and also handle conflict situations. This is the capability that NCache provides which Redis does not support.

2 – Security & Encryption

Many of the applications needing a distributed cache are dealing with sensitive and highly confidential data. Therefore, security and encryption are two areas that hold fundamental importance when talking about data storage and retrieval.

Redis is lacking support for both of these neither authentication nor encryption. NCache in contrast provides support for authentication and authorization through Active Directory / LDAP. NCache also provides very strong encryption options to encrypt the stored data. Here they are:

  •        3DES
  •        AES-128
  •        AES-192
  •        AES-256

Read more on NCache encryption here.

3 – Read-through & Write-through

Read-through and write-through are familiar concepts in the domain of distributed caching. But for people starting to get familiarized with caching it won’t hurt to give a brief definition for these.

Read-through means that your application always asks the cache for data and the cache gets it from your data source if it doesn’t have it. So, this simplifies your application code greatly because cache API is very simple to use in comparison to database.

Similarly write-through allows your application to write to the cache and the cache then writes the same data to the database either synchronously or asynchronously.

Both these features allow you to designate the distributed cache as your enterprise data store and have all applications read from it and write to it. And, the cache then deals with the database. This results in the cache always being synchronized with your database.

Despite its importance Redis lacks this feature but NCache covers it in length and breadth.

4 – Cache Administration

The effectiveness of distributed cache also depends on your ability to administer and monitor it through user friendly GUI tools. In this regard, Redis does not provide any GUI tools for its cache administration or monitoring. The only things available to you are the command line tools.

On the other hand, NCache provides powerful GUI based tools like NCache Manager and NCache Monitor for cache administration and monitoring. Some people however prefer to use command line tools because you can use them in scripts for automation. In this regard, NCache also provides all the cache administration through command line tools.

5 – ASP.NET View State Caching

View State is a powerful mechanism that ASP employs to store pages, controls and custom values between multiple HTTP requests across client and the server. This View State is passed in form of an encrypted text which becomes very large in cases involving forms with lot of controls, Data Grid control, or some other complex controls. This raises two concerns:

  •        Security risk
  •        Bandwidth usage

Both of these concerns will be answered if we have a distributed cache that can store the View State text and passes back an identifier that can be used to retrieve our View State from the store. NCache provides this exact functionality in the form of ASP.NET View State Caching whereas Redis does not.

6 – Memcached Smart Wrapper

Memcached is a popular distributed cache that is being used by a host of applications to benefit from the performance boost being discussed herein. It however has a number of limitations in the areas of high availability, data replication, cache elasticity, and ease of management.

The easiest way to address these issues for the customers using Memcached is to use NCache’s Memcached integration, such that the users can plug-in NCache to their existing Memcached applications without any code change. The users only need to change their application configuration files to take advantage of NCache’s distributed caching system.

Redis does not provide any such integration and hence falls behind on this as well.

Further Reading

For feature by feature comparison of NCache with Redis please take a look at the following link:

Redis vs. NCache

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *