Live Upgrade NCache Version
NCache offers Live Upgrading of NCache with negligible to no data loss. Live Upgrade significantly reduces the delay in your services caused by a manual upgrade. Using Live Upgrade, you can replicate the data of your currently running cache to latest NCache cache using a Bridge in between, while the caches continue to run.
Note
This feature is supported in newer versions of NCache.
The previous version cache is considered as the source cache, and latest NCache cache is considered as the target cache.
Note
The Live Upgrade NCache Version feature requires you to have a separate environment with separate set of servers.
Since the data replication is asynchronous, all clients connected to the source cache get an impression that the operations are being performed on the source cache while a complete copy is being made to the target cache, seamlessly. Meanwhile, the source cache configuration remains fully functional and unaffected by the upgrade.
Steps to Upgrade NCache Version
In order to upgrade your cache;
Create a target cache with the same name and configuration as of the source cache. Please refer to the Creating Caches section for step by step illustration of the process.
From the NCache Management Centre, click on the Bridges icon from the top left. It opens the Bridges page. Click on the New button to create a new Bridge. The rest of the process for creating Bridge is the same as explained in Creating Clustered Bridge for WAN Replication.
To this Bridge, you need to add running source cache as an active cache. Note that only one cache should be added.
On the Bridge node, manually add target cache in bridge.ncconf under the
bridge-config...cache
tags as shown below, here WestCoast is your source cache, and EastCoast is your target cache
<configuration>
<bridge-config> …
<cache cache-id=demoCache.WestCoast status=active servers-list=20.200.20.38 bulk-operation-size=500 enable-compression=False connection-retry-interval=3 heart-beat-enabled=True replicator-virtual-queue-size=2048MB is-connected=True is-master=True
cache cache-id=demoCache.EastCoast status=passive servers-list=20.200.20.39 bulk-operation-size=500 enable-compression=False connection-retry-interval=3 heart-beat-enabled=True replicator-virtual-queue-size=2048MB is-connected=True is-master=False></cache>
</bridge-config>
</configuration>
Restart the Bridge service after modifying bridge.ncconf.
Start the Bridge using the Start-Bridge PowerShell cmdlet.
Important
Make sure the source and target caches are in running state before proceeding with this step.
- Initiate state transfer using the Start-BridgeStateTransfer PowerShell tool by providing source cache and target cache as parameters.
Start-BridgeStateTransfer -Server 20.200.20.38 -Name demoBridge -SourceCache demoCache.WestCoast -TargetCache demoCache.EastCoast
You can monitor the NCache Performance Counter
state transfer per second
to monitor the state transfer.When the state transfer counter is no longer showing any values, it marks the end of the whole process and any connected clients should be stopped otherwise replication is continued.
In client.ncconf of each client node, change the IP address of source cache server(s) to the IP addresses of the target cache server(s), or you can change it though NCache Management Centre.
Start the clients. By doing so, you are effectively rerouting your clients to the target cache. All future operations by the clients will now be performed on the latest NCache version.
Warning
There might still be negligible pending activity of the source cache taking place which was requested during the state transfer, like fetch operations. It is advisable to let these remaining operations replicate to the target cache completely so that data loss is avoided.
- Check the counters for the Bridge. Once the Bridge has no data left in the queue or when the operations have been fully replicated, it is safe to
You have seamlessly live upgraded to the latest NCache version without stopping the cache.
Note
After you have completed the procedure of updating Servers, proceed with updating Clients using the upgrading process (offline).