Create New Clustered Cache
Using NCache Manager
Right-click on Clustered Caches and select Create New Clustered Cache...
New Clustered Cache wizard will open. Specify the name of the cache and click Next.
Cache with the specified name should not exist on the server; otherwise you get an error message that this cache already exists on this server.
In Select caching topology dialog, select the required cache topology. You can also change the Operation timeout (sec.) and Statistic replication interval (sec.) under the Advanced cluster options.
Specify the desired information and click Next.
If you selected the Partition Replica Cache topology, you have to select a Replication Strategy, either Asynchronous or Synchronous. Click Next.
Specify the node IP address in text box or select from the Network Neighborhood and click on the > button to add it in the Selected Nodes list.
Click Next once all the required nodes are added.
Change the Cluster Port and Port Range if required. Click Next.
In the next dialog, you can change the Maximum Size of the cache, if required.
In Advanced options dialog, you can configure the following settings:
You can change the Eviction Policy. The eviction policy will be configured and can be turned on.
You can also change the Eviction Percentage; items will be evicted from the cache using this percentage value if eviction is enabled.
You can change the Clean interval value. Default is 15 seconds.
This cache can be started automatically upon the completion of this process if you have checked the Start this cache on Finish checkbox on this dialog. You can later start the cache by right-clicking on the cache name if you do not start the cache now.
You can make the cache start automatically after service restart by checking the checkbox Auto start this cache on service startup.
Click Finish. Created cache will appear in Cache Explorer under Clustered Caches section. The blue icons next to the server nodes indicate that the cache has been started on these servers.
Using Windows PowerShell
New-Cache cmdlet enables the user to create a new cache on one or more server nodes.
This Command creates demoClusteredCache of local topology of size 1024MB on node 18.104.22.168.
New-Cache demoClusteredCache -Server 22.214.171.124 -Size 1024
Add Node to Cache
Add-Node cmdlet enables the users to add a new server node to the existing clustered cache on specified server. It also enables users to have multiple server nodes in a clustered cache.
This command adds a new node 126.96.36.199 to the cache named demoCache existing on server node 188.8.131.52 which already exists.
Add-Node -CacheName demoClusteredCache -ExistingServer 184.108.40.206 -NewServer 220.127.116.11
Once the cache is created, you need to start a clustered cache on all the server nodes so that operations can be performed on it. Start-Cache cmdlet enables the user to start the registered cache and Cache process on the nodes.
Perform this step on all server nodes.
Start-Cache -Name demoClusteredCache
Sometimes a cluster can not be formed, or cluster nodes are unable to communicate with each other. It may happen when Server and Cluster ports are blocked by firewall. Following error messages can occur in this case:
Error: "No server available to process request"
Error: "Unable to communicate with server node"
- "No server available to process request":
Make sure that the Server port (at which NCache Service starts and accepts different client connections) is not blocked by firewall. Default value of this port is '9800'. You can change the default value from Alachisoft.NCache.Service.exe.config file.
Please note that for .NET Core installation, the file name is Alachisoft.NCache.Service.dll.config.
"Unable to communicate with server node":
See if your firewall is allowing the Cluster port. Cluster port is a port at which nodes in a cluster communicate. You can change the default value of these ports from NCache Manager. If you have specified a port range in NCache Manager, unblock all ports in range.
NCache Manager unable to connect with NCache Service:
If NCache Manager is unable to connect with NCache Service, even when it is started, then your system firewall might be blocking Service port (port number 8250). Unblock Service port from system firewall.