If your business is heavily dependent on data, especially if it operates a high-traffic system, even the slightest chance of data loss can be alarming. In these scenarios, the idea of disaster recovery may seem overwhelming especially when dealing with transient data which is inherently volatile. Transient data can include ASP.NET sessions, arbitrary application data, or aggregated data. Moreover, if you lose your cache data, it must be reloaded from the database, which can negatively impact performance—something no one wants.
Fortunately, NCache was designed with the understanding that peak load failures, system outages, and other issues are inevitable when dealing with a distributed caching solution. As such, it strives to ensure high cache data availability whenever possible.
Therefore, plan your disaster recovery with NCache as soon as possible and let us guide you through the process. After conducting a thorough risk assessment of your caching tier (e.g., identifying sensitive data and specifying passive sites if you are considering data centers), you should identify potential recovery strategies. Then, run drills after implementation to ensure your strategy works. Let’s explore a few of these options below.
How does NCache help with this?
NCache offers several contingencies for disaster recovery, with the following being the most essential:
High Availability in NCache Clusters
As an in-memory distributed data caching solution, NCache provides an architecture that guarantees high data availability, even during of high traffic or system downtime. Its peer-to-peer architecture avoids the issues associated with a single point of failure.
NCache offers various caching topologies to ensure high availability, including:
- Mirrored Topology: A two nodes cluster, where one node is active and mirrored on the passive node.
- Replicated Topology: A cluster where each node has the same data replicated on it.
- Partition-Replica Topology: A cluster divided into partitions, each replicated on a different server. The replicas are passive, meaning clients cannot connect to them until the active node is deemed dead or permanently unavailable.
Any of these topologies could be ideal for high availability based on your application requirements. For instance, in the mirrored topology, if the active node fails, you have a complete replica available from the formerly passive node. Similarly, in the Partition-Replica topology, if the active node is considered dead and loses a partition, its replica will be made available to start serving data. In the replicated topology, every node has a copy of the entire cache, guaranteeing high availability.
Moreover, NCache’s peer-to-peer architecture enables self-healing dynamic clustering. This TCP-based dynamic cluster provides 100% uptime without interrupting the cluster. Additionally, NCache’s load-balancing capabilities efficiently distribute traffic, preventing server overloads from occurring.
Live Data Persistence
For added peace of mind, persistence involves writing data to a specific location for durable storage and backup. The mechanism for storing items within the persistence store is asynchronous and occurs via a persistence queue. Upon cache restart, the cache is automatically repopulated, requiring no user configuration (assuming the persistence store is already set up). Every node in the cluster can access the centralized store to repopulate any missing data.
WAN Replication
For highly transactional applications, disaster recovery is often managed by having one or more data centers. Typically, this involves an active and a passive data center located in a different geographical area.
NCache provides WAN replication via a bridge. In an active-passive configuration, you deploy NCache on both the active and passive sites. The active site uses a bridge topology to send all updates from its cache to the bridge, which then asynchronously transmits them to the passive site within milliseconds (minimal latency based on the distance between data centers).
Asynchronous replication means that applications and caches at each site do not wait for their data to replicate across data centers. Instead updates are queued at the bridge, which is a two-node cluster. If you have three or more data centers, the bridge applies incoming updates to multiple active sites in parallel and performs bulk updates, combining multiple data items into a single request to reduce network trips.
If the active site goes down due to a disaster, the bridge and application will also go down, but the passive site will take over as the new active site, handling all application traffic. All data would already be replicated from the original active site to the original passive site, with no disruption to users. Once the original active site is restored, it connects to the new active site (the original passive site) and synchronizes completely. After synchronization, both data centers have an active-active configuration, and traffic can be offloaded to the original active site. The status of the active-active site can then be reverted to passive on the bridge at runtime.
Backup and Restore
If a specific version of your data is critical, you can use NCache’s Import/Export Cache Data feature. You can use the Export-CacheData PowerShell cmdlet to export the cache data. Once exported, you can retrieve all items in the existing backup of the cache along with the related Lucene documents using the Import-CacheData cmdlet.
Conclusion
In conclusion, NCache offers a suite of powerful tools to ensure high availability, including versatile topologies, advanced architecture, and effective WAN replication features that mitigate the risk of data loss during disasters. Additionally, its support for two types of backups further safeguards your data. Download NCache today to implement a robust caching solution that will support you through both, prosperous and challenging times.