Try Playground
Show / Hide Table of Contents

Add Cache Server Node

You can add a cache server node to the cluster at any time. After adding a server node to the cluster, you need to start that node so that it can join the cluster.

Note

This feature is also available in NCache Professional.

Adding Cache Server Nodes When Using Public IP's

If you have subscribed to NCache Cloud and chosen the Public IP connectivity option, you should know that all the cache servers in the cluster have both public ips and private ips. The public ips are used for the clients to connect to these servers, whereas the private ips are used within the cluster by these servers.

Therefore, when you want to add a cache server to the cluster, you must use its private ip and not its public ip. For this, you can refer to the Environment Details page in the NCache Cloud Portal and copy the Private IP Address as you can see below.

Important

Make sure to use private ip of the server being added in this case.

Environment Details

Prerequisites

Make sure the NCache Service is running. If it is not, do the following:

  • Windows Environment
  • Linux Environment

In any Command Line Tool of your choice, enter the following command:

Start-Service -Name NCacheSvc

For .NET Core, ensure that you are running the NCache Service as an administrator. Here are the steps to do so:

  • Open the 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.

In a terminal of your choice, type the following command:

> sudo systemctl start ncached

Using Management Center

  • Launch the NCache Management Center by browsing to http://localhost:8251 or <server-ip>:8251 on Windows and Linux.

  • In the left navigation bar, click on Clustered Caches. This opens up a new page at <server-ip>:8251/. The page shows any existing local or clustered caches and additional details like Servers and Server Platform.

  • Against the cache name, click on View Details.

Add Server Node Web

  • This opens up the detailed configuration page for the cache. The Server Nodes tab displays a list of IP statuses on the existing server nodes of the cache.

  • Click on the Add Client Node Button Web button and specify the server node's IP. Click on Add Client Node Button Web to add it to the cache. Upon which you will get a success notification.

Enter server node ip web

Note

You might get prompted with a dialog box upon these changes, asking whether to reload or overwrite the cache config file.

  • The newly added node is displayed in the Server Nodes List.
Note

You also have the option to download logs to monitor a specific server node.

Using Command Line

The Add Node enables the users to add a new server node to the existing cache on the specified server.

This cmdlet enables the users to add a new server node to the existing cache on the specified server. It also enables users to have multiple server nodes in a clustered cache.

  • Windows
  • Linux
Add-Node -CacheName demoCache -ExistingServer 20.200.20.39 -NewServer 20.200.20.40
add-node -cachename demoCache -existingserver 20.200.20.39 -newserver 20.200.20.40

Manually Editing NCache Configuration

Important

Make sure the cache is stopped before making any configuration changes.

  • To add a server node to a cache cluster, add a new <server-node> tag within the <servers> tag in config.ncconf of each of your cache servers. The following example adds a new node 20.200.20.39 to the cache named demoCache existing on server node 20.200.20.40:
<cache-deployment>
  ...
<servers>
  <server-node ip="20.200.20.40"/>
  <server-node ip="20.200.20.39"/>
</servers>
...
</cache-deployment>
Note

Repeat this step on all server nodes.

  • In client.ncconf of the server node from where the client is being executed, add the following information about the node under the <configuration> tag:
<cache id="demoCache" load-balance="True" enable-client-logs="False" log-level="error">
  <server name="20.200.20.40"/>
  <server name="20.200.20.39"/>
</cache>
  • Once changes are made, start the cache and restart the NCache Service.

Verify Successful Addition of Node

To verify the successful addition of the server node, open the Command Line and use the Get-Caches cmdlet (shipped with NCache) with the -Detail parameter which gives a detailed status of all caches registered on the cache server.

For example, in this case, the demoCache has a Cluster size of 2 with the IP address of each cache server listed with it. The node which has been added will exist in the list now. The output also displays additional cache information like Item Count and Status.

Get-Caches -Detail

See Also

Create a Cache
Remove Cache
Remove Server Node

In This Article
  • Adding Cache Server Nodes When Using Public IP's
  • Prerequisites
  • Using Management Center
  • Using Command Line
  • Manually Editing NCache Configuration
  • Verify Successful Addition of Node
  • See Also

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Professional
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - 2025. All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top