Add Client Node in Cache
Cache clients are lightweight modules through which cache applications can connect to hosted cache servers. You can add local or remote client nodes to existing clustered cache(s) in NCache.
Note
At a time, your cache can only connect to 1 client, it can be local or remote.
Step 1: Add Cache Connection in client.ncconf
Please note the following points before proceeding:
There might be other caches already registered on the cache server. Please paste the following config under the
<configuration>
section so that this new<cache>
section is at the same level as other sample caches shipped with setup.You can modify this configuration to change the name from demoClusteredCache to the name of the cache containing the client.
Replace the IP Addresses given in the
<server>
section with the IP Addresses of your client machines. Note that the IP addresses must be the Binded IPs.Ensure all cache server nodes are specified if the client exists in a clustered cache.
The following sample adds the cache client to the cache demoClusteredCache running on servers 20.200.20.29 and 20.200.20.30.
In client.ncconf of the client node, add the following information about the cache and servers under the <configuration>
tag:
Note
Replace the server node IPs according to your server node IPs.
<configuration>
...
<cache id="demoClusteredCache" load-balance="True" enable-client-logs="False" log-level="error">
<server name="20.200.20.29"/>
<server name="20.200.20.30"/>
</cache>
...
</configuration>
Step 2: Verify Addition of Cache Client
To verify that the cache client has been configured successfully, open PowerShell and run the Test-Stress cmdlet from the client node making cache calls to the cache servers.
Test-Stress -CacheName demoClusteredCache
See Also
Remove Client from Cache
Configure Caches
Cache Settings (config.ncconf)