If your business is heavily dependent on data, particularly, if it’s a high-traffic system, any whiff of an opportunity for data loss is surely enough to set the alarm bells ringing. Further, the idea of disaster recovery must be a complete nightmare.
Particularly if you’ve incorporated a caching tier, since cache data (especially, transient data), by its very definition, is volatile. This transient data can be ASP.NET sessions, arbitrary data generated by your application, or aggregated data. Additionally, if you lose other cache data, it reloads from the database, which harms performance – which no one wants.
Luckily for you, NCache was created with the understanding that peak load failures, system outages, and more were inevitable issues when dealing with a distributed caching solution. As such, it attempts to guarantee high cache data available wherever it can.
So, plan your disaster recovery with NCache at your earliest and allow us to guide you through it. Post conducting a thorough risk assessment of your caching tier (i.e., identifying sensitive data, if you are considering data centers – specifying your passive sites, etc.), you need to identify the possible courses of recovery. Then, you must run some drills after implementation to ensure your strategy works. Let’s explore a few of these avenues below.
How does NCache help with this?
NCache offers users several contingencies for disaster recovery, the following are the most essential:
High Availability in NCache Clusters
As an in-memory distributed data caching solution, NCache offers an architecture that guarantees high data availability even during the previously discussed periods of high traffic or system downtime. Its peer-to-peer architecture avoids the issues associated with a single point of failure.
Furthermore, it offers an array of caching topologies that ensure high availability. They are as follows:
- Mirrored Topology: A cluster with two nodes where one is active and is mirrored in the passive node.
- Replicated Topology: A cluster where each node has the same data replicated on it.
- Partition of Replica Topology: A cluster divided into partitions where every partition replicates on a different server, and the replicas are passive, meaning clients cannot connect to them, until the active node is determined dead or permanently unavailable.
Any of these topologies could be just the thing you need for high availability based on your application requirements. Since the various replicas created when incorporating them ensure you don’t lose your cache data. For instance, in the mirrored topology, upon losing the active node, you have a complete replica available to you from the formerly passive node. Similarly, in the POR topology, if the active node is considered dead and loses a partition, its replica will be made available to start serving you. And in the replicated topology, every node has a copy of the entire cache guaranteeing high availability.
Moreover, its peer-to-peer architecture allows it the capability for self-healing dynamic clustering. This TCP-based dynamic cluster provides 100% uptime without stopping the cluster. Further, NCache’s ability to load balance perfectly equips it for this setup, as it distributes traffic more efficiently – preventing servers’ overloads from taking place in the first place. Clearly, if you are looking for high availability, you should be looking at NCache.
Live Data Persistence
A feature for those who merely want some additional peace of mind, persistence refers to the process of writing data in a specific location for durable storage and data backup. The entire mechanism of storing items within the persistence store is asynchronous and takes place via a persistence queue.
Upon cache restart, the entire cache is repopulated automatically. This requires no user configuration required (provided you’ve already set up your persistence store). Not to mention, every node in your cluster can access the centralized store to repopulate should they face any missing data.
WAN Replication
The setup most closely associated with disaster recovery for highly transactional applications is having one or more data centers. Here, one active data center has a passive data center that is usually in a different geographical location for precisely these purposes.
Therefore, NCache provides a WAN replication feature via a bridge. In an active-passive configuration, you deploy NCache on both active and passive sites, creating a bridge topology on the active site. All application updates come from the active site’s cache to the bridge, which asynchronously sends them to the passive site within milliseconds (the only delay here is the latency between data centers if they are far apart).
However, asynchronous replication means that applications and caches at each site are not waiting for their data to replicate in other data centers. Data updates queue at the bridge, which is a two-node cluster. If you have three or more data centers, the bridge applies any incoming updates to multiple active sites in parallel. Additionally, the bridge performs bulk updates. So, you can combine multiple data items into a single request and send them to other sites as a single bulk request, reducing network trips.
If the active site goes down due to some disaster, the bridge will go down, as will the application. Thus, the passive site must cater to all application traffic, becoming active. All data would already be replicated from the original active site to the original passive site, with no disruption to users. As such, all updates happen here, but the users see no interruptions.
Once the original active site is up again, it connects to the new active site (the original passive site) and synchronizes itself completely. Once the synchronization is complete, both data centers are active-active. This happens even though all of the traffic goes to the original passive site. At this point, you may offload all traffic to the original active site. After which, you can change the status of the active-active site back to passive on the bridge. NCache allows you to do all of this at runtime.
Backup and Restore
If a particular version of your data is critical, you can use NCache’s Import/Export Cache Data feature. You can use the Export-CacheData PowerShell cmdlet, and once exported, you can get all the items present in the existing backup of the cache along with the related Lucene documents using the Import-CacheData cmdlet.
Conclusion
NCache offers users several powerful tools to ensure high availability. In most cases, these tools (primarily its topologies, architecture, and WAN replication) prevent serious data loss from occurring in a disaster scenario. Then, NCache goes a step further and allows for two types of backup creation to ensure you have a backup if worse comes to worst. So, download NCache now and set up a caching solution that guides you through the good and bad times.