Cookie Consent by Free Privacy Policy Generator NCache Architecture (Quick Peek)

NCache Architecture (Quick Peek)

Let's take a quick peek into NCache Architecture. Please note that NCache is industry's only 100% native .NET caching solution. If you have a .NET application, NCache fits into your application stack very nicely.

NCache Deployment in the Enterprise

Here is how NCache is typically deployed in the Enterprise to achieve extreme performance. Please note the separate caching tier with two or more cache servers. NCache allows you to add more servers at runtime without stopping the cache or your application.

NCache Deployment in Enterprise

Please also note that you don't have to have a separate caching tier, your application and NCache can run on the same servers. Your applications that use NCache are usually Web Applications, Microservices, Web APIs, or other server applications.

Dynamic Architecture

Dynamic Cluster

Let's dive into the NCache architecture. The heart of that is its dynamic architecture. The first part of that is Dynamic Cluster. NCache has a TCP based cache cluster that is peer-to-peer in nature which means there's no master or slave. This dynamic cluster means that you can add or remove servers at runtime without stopping the cache, and the cluster membership information is propagated at runtime. This cluster also has a connection failover feature, so if the connection between the servers break they automatically reconnect to each other.

Dynamic Cluster

Dynamic Clients

The second part of the dynamic architecture are the Dynamic Clients. You can add/remove client at runtime without stopping the cache or your application. And all the configuration information, which is Cluster Membership, Caching Topology, Distribution Map, is propagated to the clients at runtime, and even if it changes it gets propagated at runtime. The clients also have a connection failover feature. So, if the connection with the cluster breaks the clients also automatically reconnect with the cluster.

Dynamic Clients

Split-Brain Recovery

The third part of the dynamic architecture is the Split Brain Recovery of the cluster. Just like any distributed system, NCache cluster can also see split brain because of network issues. When that happens NCache detects the split brain and automatically recovers from it when the network issues are restored.

Split-Brain Recovery

Caching Topologies

Caching topologies are strategies on storing and replicating data in the cache and how the clients should connect to different servers.

Mirrored Cache

The first topology is called Mirrored Cache. It's a 2-Node Active/Passive topology. All the clients connect to the active node that has an entire copy of the cache, and another copy is kept on the passive node. All the changes from active node are asynchronously backed up to the passive node. If the active node ever goes down the passive node automatically becomes active and the client's connect to it.

Mirrored Cache

Replicated Cache

The second topology is called Replicated Cache in which every server in the cluster is active and it has an entire copy of the cache. The clients usually connect to only one server, but if that server goes down they connect to any other server in the cluster. All the reads are super-fast because they're local to that server but the updates have to be synchronous across the cluster.

Replicated Cache

Partitioned Cache

Another topology is called Partitioned Cache. This topology provides you linear scalability because the entire cache is broken up into partitions, and every server has one partition and the clients connect to all the partitions so they can directly access read and write data from that partition. There's a dynamic data balancing feature that ensures that all the partitions have pretty much the same amount of data.

Partiioned Cache

Partition-Replica Cache

Another topology is called Partition Replica Cache. This is similar to partitioned cache except every partition has a replica on a different server. And, this replica provides high availability. So, if any one partition goes down there's no loss of data.

Partiion-Replica Cache

Partition Replica is our most popular topology because it gives you best of both worlds. It gives you linear scalability from partitioning and high availability from replication. The replication is asynchronous by default but you can use synchronous application. And this also has dynamic data balancing.

Client Cache

Client Cache is also a very powerful feature that gives you InProc speed. Client Cache sits on your client or your application server even within your application process. And whatever your application fetches from the clustered cache it's kept in the client cache. And, if that data changes in the clustered cache, the clustered cache notifies the client caches to update themselves. So, it's kept synchronized.

Client Cache

WAN Replication

NCache provides WAN Replication feature across multiple regions or multiple zones. If you have, for example, a two site deployment of NCache, it could be either active-active or active-passive you can do WAN replication across that.

If you have a three or more site deployment then one site has to be active and the others can be a combination of active or passive.

2 and 3+ site deployment of NCache

Schedule a Demo

Please contact us to schedule a demo about an in-depth NCache Architecture, NCache features, and strategies on how you should use NCache in your application. Thank you.

What to Do Next?

© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.