How To Configure 2-Node Replicated Cache in NCache Express

Now you can easily configure NCache Express to use a 2-node Replicated Cache for storing sessions or objects in a cache. Replicated Cache provides you with fail over and reliability by replicating the data synchronously to the other server node in the cluster. In case one of your cache servers goes down the other one can be used without any loss of data. Just make sure that the client applications using this cache are local to one of the nodes in the cluster. Here is a simple procedure to configure a 2-node replicated cache cluster in NCache Express.

Please make sure you have NCache Express installation on 2 the machines that you will be using as your 2-node cluster.

  • Choose one of the machines, where you are hosting your client application, and go to config folder in NCache Express installation folder (e.g. C:\Program Files\NCache Express\config)
  • In Client.ncconf file under the cache tag, find the <server> tag, you have to add another server tag with your second server information. A sample code is shown below to add two servers; and
  • Save Client.ncconf.
  • Open the config.ncconf file and find the tag cache-config, modify the sub-tag <channel> and specify the server information here as well. A sample code is below


Save these files and then restart the NCache service so the new configurations can take effect. Go to Start->Run and type: services.msc. Locate NCache service, right click and choose restart. To start the cache, go to Start->Programs->NCache->Tools->Command Prompt and type:

C:\> startcache myreplicatedcache

To check the status of the cache to see whether it is running or not, type:

C:\> listcaches /a


What to Do Next?