Redis Alternative for .NET Apps - NCache

If you have an ASP.NET / ASP.NET Core, .NET web services, .NET Microservices, or any other .NET server application and are considering the use of Redis then please take a look at NCache as it is an ideal Redis alternative for .NET applications.

NCache is a 100% native .NET Open Source in-memory distributed cache. NCache is extremely fast and linearly scalable and helps you remove your application performance bottlenecks around data storage and databases.

For the last 13 years, NCache has been a .NET market leader and preferred industry choice for .NET applications scaling needs.


Below are some of the reasons why NCache is an ideal Redis alternative for .NET applications.


Reason 1: Native .NET Cache

NCache is .NET / .NET Core

The first reason why NCache is a great Redis Alternative is because NCache is 100% native .NET / .NET Core. And fits nicely with your .NET application stack. That is why, it is the favorite in .NET developer community and a .NET market leader for the last 13 Years.

As a result of this, NCache allows you to have .NET server-side code like Read-through/Write-through, Cache Loader, Custom Dependency, and Entry Processor. And hence is a perfect candidate as redis alternative for Windows/.NET/.NET Core applications.

NCache supports the following platforms:

  • Windows Server: officially supported
  • Windows Nano Server: officially supported
  • Linux (thru .NET Core): officially supported

Read more about NCache On-Premises Deployment Options.

Redis is C++ / Linux

Redis is developed in C++ on Linux. And, it is not officially supported on Windows. Below are the Redis platform support options:

  • Linux: supported by Redis Labs. Azure Redis Cache by Microsoft also runs on Linux.
  • Windows:
    • Ported by Microsoft but usage without any support.
    • Redis Labs does not support Windows in production.

Reason 2: Cache Performance

NCache has Client Cache (InProc Speed)

Second reason NCache is perfect candidate as Redis Alternative is because it offers Client Cache (Near Cache). Which is basically a local cache very close to your application (InProc/OutProc). And it keeps a subset of the cache either very close to your application (OutProc) or inside your application process (InProc) while keeping it synchronized with the entire cache cluster.

Client Cache gives your application InProc speed, meaning as fast as fetching objects from your application process memory/heap. This is extremely fast and no OutProc cache (like Redis) can match this.

Redis has No Client Cache (Remote Cache Speed)

Redis does not provide any Client Cache. As a result, you must always go to the caching tier across the network to fetch any data from the cache or update it.

Comparing NCache vs Redis, there is no match to the InProc speed in NCache thru Client Cache.


Reason 3: High Availability

NCache has High Availability (Self-Healing)

Third reason for choosing NCache as Redis Alternative could be Redis high availability and maintenance issues. NCache has a highly dynamic architecture. Two things that set NCache apart from Redis are

  1. Peer-to-Peer Clustering architecture
  2. Partition-Replica Cache topology with dynamic cache partitioning

Peer-to-peer clustering means there is no Master/Slave concept and you can add or remove ANY cache server from the cluster without stopping or restricting anything. NCache automatically adjusts the cluster membership when this happens. This is extremely useful because at runtime you don’t know which server might go down but you want your cache to always be running.

Partition-Replica Cache topology is the second reason for high availability because it automatically adjusts cache partitioning whenever you add or remove a cache server from the cluster. This makes NCache self-healing which means NCache automatically adjusts itself to the “new reality” when a cache server is added or goes down.

Redis has Availability Issues

Unlike NCache’s Peer-to-Peer dynamic clustering, Redis in memory cache has a Master/Slave clustering architecture with shards that are rigid at runtime. For example, if a shard goes down or is removed at runtime, the cluster becomes unavailable until hash-slots of the removed shard are manually reassigned to remaining shards in the cluster. And, this manual intervention while cache is down is very painful and problematic.


Reason 4: Azure & AWS Cloud - Redis Alternative

NCache Officially Supports Cloud Platforms

Fourth reason why NCache is a great Redis Alternative is because NCache provides cloud features that are important for business critical .NET Applications. NCache officially supports both Azure and AWS cloud platforms both from their marketplace and through NCache Cloud Portal for Azure & AWS. And, NCache in cloud automatically provides email and phone based technical support during office hours. And, you can optionally purchase our 24x7 support as well.

Following cloud options are provided by NCache:

  • Virtual Machine (Azure & AWS Marketplace)
    • Free 60-day Trial (BYOL licensing)
    • Tech support included
    • 24x7 support provided (optional)
  • Managed Cache Service (NCache Portal for Azure & AWS)
    • Free 60-day Trial (BYOL licensing)
    • Tech support included
    • 24x7 support included
    • 24x7 monitoring included

NCache Virtual Machines are available from Azure and AWS Marketplace. In this option, the caching infrastructure is managed and monitored by your own IT staff and they have full access to these VMs. And, you can contact NCache tech support for both regular support and optionally 24x7 support if purchased.

NCache Managed Cache Service is available from NCache Cloud Portal (at alachisoft.com website). This option comes with built-in regular support and 24x7 support. And, it also includes 24x7 monitoring provided by Alachisoft staff. Your IT staff can also have full access to the cache cluster VMs if you wish but you do not have to have this access.

Read more about NCache Cloud Deployment Options.

Redis has Mixture of Weak Cloud Support for .NET Apps

Unlike NCache that is supported fully by Alachisoft everywhere including 24x7 support, Redis comes in multiple flavors that are supported by different companies that are unrelated to each other. And, most of the places, Redis Open Source is being supported by companies that do not own its source code and neither do they control it. These flavors of Redis are:

  • Azure Marketplace: Azure Redis Cache (Redis Open Source)
    • Supported by Microsoft
    • Fewer features than NCache Enterprise
    • Source code not controlled by Microsoft
    • No bug fixes or feature enhancements provided with any SLA
    • No 24x7 support provided
    • Only Linux platform supported (no Windows support)
  • Azure & AWS Marketplaces: Redis (Redis Open Source)
    • Supported by Bitnami and Jetware
    • Fewer features than NCache Enterprise
    • Source code not controlled by Bitnami and Jetware
    • No bug fixes or feature enhancements provided with any SLA
    • Only Linux platform supported (no Windows support)
  • AWS Marketplace: Redis Enterprise
    • Supported by Redis Labs
    • Fewer features than NCache Enterprise
    • Bug fixes and feature enhancements with SLA.
    • Only Linux platform supported (no Windows support)

For mission-critical .NET applications, you need to make sure that the distributed cache you’re integrating into your application is fully supported for such sensitive business needs. Otherwise, your business suffers when something goes wrong.


Reason 5: Keeping Cache Fresh

Fifth reason why NCache is a great Redis Alternative is because NCache provides features to make sure your cache is always fresh. The most common use case for a distributed cache is to cache application data that also resides in the database and could be updated by other applications in the database. And, if this data becomes stale in the cache then you lose all confidence on the data integrity.

As a result, you end up restricting your caching to read-only data which is only 10% of the total data in most cases. And, because of this, your application does not benefit completely from a distributed cache and does not scale its performance fully.

See how NCache and Redis compare in this very important feature area.

NCache Provides Rich Features

NCache provides a rich set of features to let you make sure your cache is always fresh and you can confidently rely on its data integrity. As a result, you’ll cache practically all data.

Here are some of the features NCache provides:

  • Expirations: You can use Absolute Expirations and Sliding Expirations to remove older data from the cache and keep only fresh data in it.
  • Synchronize Cache with DB: You can sync cache with SQL Server and Oracle DB thru database notifications. You can also use OLEDB for polling-based cache synchronization.
  • Sync Cache with Non-Relational: You can monitor any custom data source thru a Custom Dependency feature of NCache and sync the cache with external data sources whenever data changes there.
  • Handle Relational Data: You can create one-to-many and one-to-one data relationships in the cache between cached items and auto-invalidate an item from the cache when a related item is updated or removed. This helps keep only fresh data in the cache.

Redis Provides Very Limited Features

Redis does not have the ability to do most of what NCache does when it comes to keeping your cache fresh. It relies on your application to keep track of all this which makes your life difficult and, in many cases, it is not even possible.

Here is what Redis provides:

  • Expirations: You can use Absolute Expirations. You have to implement Sliding Expiration yourself by changing Absolute Expiration every time the item is fetched.

Reason 6: Search Cache with SQL & LINQ

Sixth reason why NCache is a prominent Redis Alternative is because NCache provides SQL and LINQ support for searching cache. Once you have a distributed cache that allows you to keep it fresh, you end up caching a lot of data. And, the more data you cache, the more you need to be able to “search” it based on something other than keys.

NCache lets you search the cache based on object attributes, groups/subgroups, tags, and named tags. This makes it really easy for you to find the data you’ve stored in the cache.

Redis has no such support.

NCache SQL & LINQ Search

NCache provides a rich set of features to let you search the cache with SQL/LINQ. Here are some of the features NCache provides:

  • Groups/Subgroups: You can assign group/subgroup to cached items and later find them based on this logical grouping.
  • Tags / Named Tags: You can assign Tags and Named Tags to cached items and later find them based on this.
  • SQL & LINQ Queries: You can search the cache with SQL queries and LINQ queries. And, you can include object attributes, Groups/Subgroups, Tags, and Named Tags as part of the search criteria.
  • Indexing for Speed: NCache lets you created indexes on object attributes. NCache automatically creates indexes on Groups/subgroups, Tags, and Named Tags. As a result, your search queries are super-fast.

Redis Has No Support

Redis has no such support for SQL/LINQ searching.


Reason 7: Server-Side Code (in .NET)

Seventh reason why NCache is a eminent Redis Alternative is because NCache allows you to deploy server-side code to run on the cache servers in the cluster. A really powerful distributed cache allows you to deploy server-side code to run on the cache servers in the cluster. NCache provides strong support server-side code and also lets you develop it in .NET since NCache itself is a native .NET solution.

Redis has no such support.

NCache Server-Side Code

NCache is the only .NET solution to provide you server-side code capability. NCache provides a rich set of features to let you develop and deploy server-side code in .NET to run on the cache servers in the cluster. Here are some of the features NCache provides:

  • Read-through: You can implement a Read-through handler and deploy it on cache servers. NCache then calls your custom Read-through handler to fetch data from your database if it is not found in the cache.
  • Read-through with Auto-Reload: When you combine Read-through with auto-reload feature, NCache automatically reloads data from the database upon expiration or database synchronization
  • Write-through: You can also implement Write-through to let the cache update your database for you when you update the cache. This simplifies your application by shifting persistence code into the caching tier.
  • Write-behind: Write-behind uses the Write-through handler to update the database asynchronously so your application doesn't have to wait for the database to be updated. This improves your application performance.
  • Cache Loader: You can implement a Cache Loader and deploy it to the cache cluster. NCache then calls it to pre-load the cache automatically in a distributed fashion from all the cache servers in the cluster.
  • Custom Dependency: You can write and deploy Custom Dependency code to monitor your own data source for any updates. When an update occurs, NCache removes the corresponding cached items from the cache.
  • Entry Processor: You can write and deploy Entry Processor that NCache calls on all the cache servers to process data in the cache close by. Entry Processor can run InProc to the cache server where cached data is available from within process.

Redis Has No Support

Redis has no such support for server-side code.


Reason 8: WAN Replication for Multi-Datacenter

Eighth reason why NCache is a distinguished Redis Alternative is because NCache can handle distribution across WAN in multi-datacenter deployments. More and more high traffic applications are now being deployed in multiple datacenters (Azure Regions or AWS Availability Zones) either for geographic affinity and load balancing or for high availability and disaster recovery.

When this happens, then just like your application database, your distributed cache needs to handle this distribution across the WAN.

NCache Provides WAN Replication

NCache provides a rich set of features for WAN Replication of the cache. Here are some of the features NCache provides:

  • Active-Passive: One datacenter is Active and the other one is Passive. NCache handles all updates from Active to Passive asynchronously.
  • Active-Active: Both datacenters are active and processing user transactions simultaneously. NCache handles two-way synchronization asynchronously and also does conflict resolution if the same data is updated on both sides.
  • Multi-Datacenter ASP.NET / ASP.NET Core Sessions: In some cases, you have regional load balancing in multi-datacenter where you don’t want to replicate all user sessions across datacenters as it is unnecessary. But you want to overflow users from one datacenter to another or bring one datacenter down and migrate all its users to the other datacenter seamlessly. NCache allows you to do this for ASP.NET and ASP.NET Core.

Redis Has Limited Support

Redis has the following limited support.

  • Azure Redis Cache: No WAN replication provided.
  • Azure & AWS Redis (Bitnami & Jetware): No WAN replication provided.
  • Redis Open Source (On-Premises): No WAN replication provided.
  • Redis Enterprise (Redis Labs): WAN replication provided for active-active. Runs on Linux.

Download NCache vs Redis (Detailed) Comparison

To help you further with your evaluation you can download our detailed feature level comparison, and find out best fit for your .NET applications scaling needs. Feel free to contact our tech support for handholding session or any technical questions.

Download NCache vs Redis Comparison

Signup for monthly email newsletter to get latest updates.

Contact Us

PHONE

+1 (214) 764-6933 (US)

+44 20 7993 8327 (UK)

© Copyright Alachisoft 2002 - . All rights reserved.