• Facebook
  • Twitter
  • Youtube
  • LinedIn
  • RSS
  • Docs
  • Comparisons
  • Blogs
  • Download
  • Contact Us
Download
Show / Hide Table of Contents

Remove Cache Server Node

A pre-existing server node can be simply removed from the cache it is a part of, using the NCache Management Center and PowerShell, etc., as detailed below.

Using the NCache Management Center

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

  • In the left navigation bar, click on Clustered Caches. This opens up a new page. It shows any existing local or clustered caches and additional details like Server and Server Platform.

  • Against the cache name, click on View Details.

Remove Server Node Web

  • This opens the detailed configuration page for the cache. The Server Nodes tab displays a list and status of the existing server nodes of the cache.

  • Choose the node to be removed. Click on the Remove Server Node Button Web button. A success notification will be displayed.

Server Node Removed Web

Note

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

  • The server node is removed from the Server Nodes list.

Using PowerShell

  • The Remove Node cmdlet enables the user to remove a particular node from the existing cache on a server or a specified node from the provided clustered cache. The following command removes node 20.200.20.39 from demoCache.
Remove-Node -CacheName demoCache -Server 20.200.20.39
  • The following command removes the specified server node from the cache named demoCache from the local server by gracefully stopping it.
Remove-Node -CacheName demoCache -Server 20.200.20.39 –GracefulStop
  • The following command removes the specified server node from the cache named demoCache using security credentials.
Remove-Node –CacheName demoCache –Server 20.200.20.39 -Credentials(Get-Credential john_smith)

Manually Editing NCache Configuration

You can also manually edit the NCache configuration to remove a server node from the cluster.

Note

The following steps apply to both NCache Enterprise and NCache Open Source. However, NCache Open Source only supports Replicated Caches and allows a maximum of 3 nodes in a Replicated cache cluster.

Remove a Node from a Cache Cluster

You can remove a server node from a cache cluster by updating the <cache-deployment> section in the config.ncconf file. To remove a server node from a cache cluster, follow these steps:

  • Open the config.ncconf file with administrative privileges on any existing cache server node, such as node-1 20.200.20.40, node-2 20.200.20.39, or node-3 20.200.20.38.

    <cache-config cache-name="demoCache" alias="" config-id="44fb997a-f6a7-433b-9439-7ef9de9f47c7" config-version="0" store-type="distributed-cache">
      <cache-settings inproc="False" data-format="Serialized" serialization="Json">
        <logging enable-logs="True" trace-errors="True" trace-debug="False" log-path=""/>
        <performance-counters enable-counters="True" snmp-port="0"/>
        <cleanup interval="15sec"/>
        <storage type="heap" cache-size="1024mb"/>
        <eviction-policy enabled-eviction="True" default-priority="normal" policy="priority" eviction-ratio="5%"/>
        <cache-topology topology="replicated">
          <cluster-settings operation-timeout="60sec" stats-repl-interval="300sec">
            <cluster-connection-settings port-range="1" connection-retries="1" connection-retry-interval="2secs" cluster-port="7801"/>
          </cluster-settings>
        </cache-topology>
        <client-death-detection enable="False" grace-interval="60sec"/>
      </cache-settings>
      <cache-deployment deployment-version="0">
        <servers>
          <server-node ip="20.200.20.40"/>
          <server-node ip="20.200.20.39"/>
          <server-node ip="20.200.20.38"/>
        </servers>
      </cache-deployment>
    </cache-config>
    
  • In the <cache-deployment> section of the cache named demoCache, remove the <server-node> entry for the node that you want to remove. For example, to remove node 20.200.20.38, update the <cache-deployment> section as follows:

    <cache-deployment deployment-version="0">
      <servers>
        <server-node ip="20.200.20.40"/>
        <server-node ip="20.200.20.39"/>
      </servers>
    </cache-deployment>
    
  • Save the updated config.ncconf file.

  • Copy the updated <cache-deployment> block to the config.ncconf file on all remaining cache server nodes.

  • Restart the NCache Service on every remaining node in the cluster.

    Restart-Service -Name NCacheSvc
    
  • Stop and start the cache on every remaining node.

  • Verify that the node has been removed successfully by executing the following PowerShell cmdlet:

    Get-Caches -Detail
    
  • Once the command executes successfully, the removed node no longer appears in the cache cluster details.

    Cache Cluster Details

Remove Server Nodes in Azure (Scale Cluster)

NCache provides you with the option to scale down your cluster. To manually scale down your NCache cluster, follow these steps within the Azure portal:

Important

When scaling down the cluster, it is recommended to reduce the number of instances one at a time to ensure cluster stability.

  • Navigate to your Resource Group, select your VMSS, and locate the Scaling option under the Availability + scale section in the left menu.

  • Choose Manual scale from the available scaling options.

  • Either enter the specific number of instances you require or use the slider bar to reach your desired server count as shown below:

    Azure Scaling

Removing Specific Cache Instance

You can also remove a specific instance from your list of instances, for that you have to:

  • Navigate to your Virtual Machine Scale Set.
  • Select Instances from the left menu. This will open up a page listing the instances you have created.
  • Select the instance you want to delete from the list, here we are deleting the instance Test_0 as shown below.

    Azure Scaling

  • In doing so, we recommend leaving the Force Delete checkbox unchecked.

    Azure Scaling

  • Enabling this option prevents the Termination event from firing, which will result in your license remaining in a consumed state.

This will scale down the cluster, and deleted instances will be automatically removed from all existing caches within the deployment.

See Also

Create a Cache
Remove Cache
Clear Cache
Configure Query Indexes

Contact Us

PHONE

+1 214-619-2601   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • 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 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top