Add Client Node
Client Nodes are lightweight modules through which cache applications can connect to hosted cache servers.
Pre-Requisite
Make sure NCache Service is started. If it is not started, do the following:
In PowerShell, enter the following command:
Start-Service -Name NCacheSvc
For .NET Core, make sure that you run NCache service as an administrator. Here are the steps to do so:
- Open Services window and look for NCache in the list.
- Right click on NCacheSvc from the list and choose Properties.
- Go to the Log On tab and click on the Browse button.
- In the object name field, type Administrator and click on the Check Names button.
- It will pick the appropriate Administrator, then click OK.
- Now, set a Password and click OK.
- Right click on the NCache service and choose the Restart option. Now your service will start running as administrator.
Using NCache Web Manager
Launch NCache Web Manager by browsing to
http://localhost:8251
(Windows) or<server-ip>:8251
(Windows and Linux).In the left navigation bar, click on Clustered Caches or Local Caches, based on the cache to which the client will be added. Against the cache name, click on View Details.
This opens up the detailed configuration page for the cache. The Client Nodes tab displays a list and status of any existing client nodes of the cache.
Click on the button and specify the client node IP. Click on + to add it to the cache. A success notification will be displayed.
- The newly added node is displayed in the Client Nodes list, with client cache status.
Note
You might get prompted with a dialog box upon these changes, asking whether to reload or overwrite the cache config file. For more detail maintaining on data integrity, refer to this chapter.
Using PowerShell
Add-ClientNode cmdlet enables the user to add one or more client nodes to existing clustered cache(s).
This command adds a Client node 20.200.20.38 to a cache named demoClusteredCache already existing on server node 20.200.20.29.
Add-Clientnode demoClusteredCache -Server 20.200.20.29 -ClientNode 20.200.20.38
Manually Editing NCache Configuration
Important
Make sure the cache is stopped before making any configuration changes.
Cache Server
- To add a client node to cache server, add the following tag within the
<cache-deployment>
tag in config.ncconf of EACH your cache server:
<cache-deployment>
...
<client-nodes>
<client-node ip="20.200.20.38"/>
</client-nodes>
...
</cache-deployment>
Note
Repeat this step for all server nodes.
- In client.ncconf of each server, add the following information about the client nodes under the
<configuration>
tag:
<cache id="demoClusteredCache" load-balance="True" enable-client-logs="False" log-level="error">
<server name="20.200.20.38"/>
</cache>
Note
Repeat this step for all server nodes.
- Once changes are made, start the cache and restart NCache service.
Remote Client Node
In client.ncconf of the client node, add the following information under the configuration tag:
<cache id="demoClusteredCache" load-balance="True" enable-client-logs="False" log-level="error">
<server name="20.200.20.38"/>
</cache>
Note
Repeat this step for all client nodes.
See Also
Remove Client Node
Configure Client Cache
Configure Caches
Management Operations