• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Show / Hide Table of Contents
  • Administrator's Guide
  • NCache Architecture
    • Cache Topologies
    • Cache Cluster
    • Local Cache
    • Cache Client
    • Client Cache
    • Data Load Balancing
    • Cache Server Backward Compatibility
    • Client Backward Compatibility
    • Eviction
    • Indexing
    • Runtime Data Sharing
    • Portable Data Types
    • Class Versioning
    • IP Binding with Multiple NICs
    • Graceful Node Down
    • Separate Cache Host Process
    • Self Healing Dynamic Clustering
  • Configuring Caches
    • Create Cache
      • Creating Local Cache
        • Create New Cache
        • Add Existing Cache
      • Creating Clustered Cache
        • Create New Cache Cluster
        • Add Existing Cache Cluster
    • Remove Cache
    • Clear Cache Contents
    • Adding Server Node in Cache Cluster
    • Removing Server Node from Cache Cluster
    • Configuring Basic Cache Settings
      • Cache Size
      • Cache Isolation Levels
      • Cache Data Expiration
      • Cache Data Format
    • Configuring Cache Cluster Settings
      • Ports
      • Operation Timeout
      • Static Replication Interval
      • Connection Retries
      • Retry Interval
    • Add Test Data to Cache
    • Deploy Providers
    • Configuring Query Indexes
    • Registering Classes for Compact Serialization
      • Registering Non-Generic Classes
      • Unregistering Non-Generic Classes
      • Registering Generic Classes
      • Registering Generic Classes Using Generic Type Handler
    • Registering Classes for Portable Data Sharing
    • Configuring Data Source Providers
      • Read-Through Provider
      • Write-Through Provider
      • Write-Through Provider for Write-Behind Operations
    • Configuring Cache Startup Loader
    • Configuring Cache Level Events
    • Configuring Cache Activity Events
    • Configuring Eviction Policy
    • Configuring Compression
    • Configuring Email Notifications
    • Binding Cluster and Client/Server IP with Multiple NICs
      • Binding Cluster with a Dedicated IP
      • Binding Client/Server with a Dedicated IP
    • Configuring Heartbeat
    • Configuring MapReduce
    • Configuring Communication Reliability
    • Auto Start Cache on Boot
    • Nagling
    • Dual Socket
    • Error Logging
    • Configuration Files
      • Client Side Configurations
        • Client Config
        • EFCaching Config
      • Server Side Configurations
        • Cache Config
        • Bridge Config
        • Security Config
      • Cache Server Configuration
  • Management Operations
    • Start Cache
    • Stop Cache
    • Restart Cache
    • Manage Cache Service on a Server Node
    • Apply Configuration
    • Hot Apply Configuration
    • Reset Configuration
    • Data Load Balancing
  • Configuring Cache Clients
    • Adding Client Node in Cluster
    • Removing Client Node from Cluster
    • Configuring Client Node Settings
    • Creating Client Cache
    • Enable Client Cache on Client Nodes
    • Disable Client Cache on Client Nodes
    • Removing Client Cache
    • Configuring Client Cache Settings
  • Configuring Security
    • Configuring Security for Cache Management
    • Configuring Security for Cache
    • Configuring Security for Client Nodes
    • Configuring Encryption for Cache
    • Configure SSL/TLS Encryption in NCache
  • Configuring Bridge for WAN Replication
    • Creating Clustered Bridge
    • Adding Clustered Caches to Bridge
    • Configuring Bridge Settings
    • Configuring Conflict Resolver
    • Changing Cache Syncronization Modes
    • Configuring Master Cache
    • Force State Transfer
    • Connect/Disconnect Cache in Bridge
    • Remove Cache from Bridge
    • Bridge Management
  • NCache on Docker
    • Using NCache Docker Images
    • Customize NCache Dockerfile
  • Monitoring NCache
    • Cache Counters
    • Monitoring Caches using NCache Manager
      • Changing Management Port of Cache Node
      • Configuring Counters to Display
      • Browse Cache Statistics
      • Cluster Health
      • Monitoring Cache Clusters using NCache Email Alerts
    • Monitoring Caches using NCache Monitor
      • Monitoring with Built-In Dashboard
      • Monitoring with Custom Dashboard
    • Monitoring Bridge using NCache Manager
    • Monitoring NCache using Windows PerfMon Tool
      • Monitoring Cache Server Counters Using PerfMon
      • Monitoring Cache Client Counters Using PerfMon
      • Monitoring Bridge Counters Using PerfMon
    • Logging in NCache
      • NCache Log Viewer
      • NCache Monitor Logging
      • Performance Counters Logging
      • Windows Event Logging
      • Email Notifications on NCache Events
      • Cache Server Logging
      • Client Side API Logging
      • Cache Event IDs
    • Troubleshooting NCache Monitoring
      • Computer Name Not Found
      • Diskperf Not Installed
      • No READ Access to the Perflib Subkeys
      • Unable to Connect to Remote Server
    • IPV6 Support
  • Upgrading NCache Versions
    • Live Upgrade NCache Version
    • Upgrade NCache Version Offline
  • Apply Windows Patches on NCache Server

Create a New Cache Cluster

Using NCache Manager

  • Select File ->New ->Clustered Cache option.

  • New Clustered cache wizard will open. Specify the name of the cache, select Data Format and click Next.

Important

Cache with the specified name should not exist on the server; otherwise you get an error message that this cache already exists on this server.

  • In Select caching topology dialog, select the required cache topology. You can also change the Operation timeout (sec.) and Statistic replication interval (sec.) under the Advanced cluster options.

  • Specify the desired information and click Next.

  • If you selected the Partition Replica Cache topology, you have to select a Replication Strategy, either Asynchronous or Synchronous.

  • Click Next.

  • Specify the node IP address in text box or select from the Network Neighborhood and click on the > button to add it in the Selected Nodes list.

  • Click Next once all the required nodes are added.

  • Change the Cluster Port if required.

  • Click Next.

  • In the next dialog, you can change the cache size if required.

  • Click Next.

  • In Advanced options dialog, you can configure the following settings:

    • Eviction is enabled by default. You can configure the Eviction Policy accordingly. If you want to disable eviction, check the check box Turn off Eviction.

    • You can also change the Eviction percentage; items will be evicted from the cache using this percentage value if eviction is enabled.

    • You can change the Clean interval value. Default is 15 seconds.

    • This cache can be started automatically upon the completion of this process if you have checked the Start this cache on Finish checkbox on this dialog box.

    • You can make the cache to start automatically after service restart by checking the checkbox Auto start this cache on service startup.

  • Click Finish. Created cache will appear in Cache Explorer under Clustered Caches section.

Using Windows PowerShell

New-Cache cmdlet enables the user to create a new cache on one or more server nodes.

The following command creates demoClusteredCache of partition-replicated topology on server 20.200.21.95 with size 1024MB on port 7802.

New-Cache demoClusteredCache -Server 20.200.21.95 -Size 1024 -Topology partition-replica -Port 7802

Manually Editing NCache Configuration

Important

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

  • In config.ncconf of EACH of your cache server, add the following configuration under the <configuration> tag which creates a Partition-Replica cache named demoClusteredCache with the servers 20.200.21.95 and 20.200.21.144, and uses all default configurations:
<cache-config cache-name="demoClusteredCache" alias="" config-id="0df06388-72ba-4199-9320-7bf3ae1d0a2f" config-version="0">
  <cache-settings inproc="False" last-modified="" auto-start="False" data-format="Binary">
    <logging enable-logs="True" trace-errors="True" trace-notices="False" trace-warnings="False" trace-debug="False" log-path=""/>
    <performance-counters enable-counters="True" snmp-port="0"/>
    <data-load-balancing enabled="False" auto-balancing-threshold="60%" auto-balancing-interval="30sec"/>
    <compression enable-compression="False" threshold="100kb"/>
    <client-death-detection/>
    <client-activity-notification enabled="False" retention-period="5sec"/>
    <cache-notifications item-remove="False" item-add="False" item-update="False"/>
    <cleanup interval="15sec"/>
    <storage type="heap" cache-size="1024mb"/>
    <eviction-policy enabled-eviction="False" default-priority="normal" policy="lru" eviction-ratio="5%"/>
    <expiration-policy enabled="False">
      <absolute-expiration longer-enabled="False" longer-value="0" default-enabled="False" default-value="0"/>
      <sliding-expiration longer-enabled="False" longer-value="0" default-enabled="False" default-value="0"/>
    </expiration-policy>
    <cache-topology topology="replicated">
      <cluster-settings operation-timeout="60sec" stats-repl-interval="600sec" use-heart-beat="False">
        <data-replication synchronous="True"/>
        <cluster-connection-settings cluster-port="7800" port-range="1" connection-retries="2" connection-retry-interval="2secs" join_retry_count="24" join_retry_timeout="5"/>
      </cluster-settings>
    </cache-topology>
    <tasks-config max-tasks="10" chunk-size="100" communicate-stats="False" queue-size="10" max-avoidable-exceptions="10"/>
    <split-brain-recovery enable="True" detection-interval="60000"/>
  </cache-settings>
  <cache-deployment deployment-version="0">
    <servers>
      <server-node ip="20.200.21.95" active-mirror-node="False"/>
      <server-node ip="20.200.21.144" active-mirror-node="False"/>
    </servers>
  </cache-deployment>
</cache-config>
  • In client.ncconf, add the following description about the servers in the cache under the <configuration> tag:
<cache id="demoClusteredCache" load-balance="True" enable-client-logs="False" log-level="error">
  <server name="20.200.21.95"/>
  <server name="20.200.21.144"/>
</cache>
Important

Make sure all these steps are repeated on all server nodes.

  • Once changes are made, start the cache and restart NCache service.

If you wish to add client nodes to this cache cluster, refer to the section Add Client Node in Cluster.

To add more servers to this cache cluster, refer to the section Add Server Node in Cluster.

Troubleshooting

Sometimes a cluster can not be formed, or cluster nodes are unable to communicate with each other. It may happen when Server and Cluster ports are blocked by firewall. Following error messages can occur in this case:

Error: "No server available to process request"
Error: "Unable to communicate with server node"

Workaround

  • "No server available to process request":
    Make sure that the Server port (at which NCache Service starts and accepts different client connections) is not blocked by firewall. Default value of this port is '9800'. You can change the default value from Alachisoft.NCache.Service.exe.config file.

  • "Unable to communicate with server node":
    See if your firewall is allowing the Cluster port. Cluster port is a port at which nodes in a cluster communicate. You can change the default value of these ports from NCache Manager. If you have specified a port range in NCache Manager, unblock all ports in range.

  • NCache Manager unable to connect with NCache Service:
    If NCache Manager is unable to connect with NCache Service, even when it is started, then your system firewall might be blocking Service port (port number 8250). Unblock Service port from system firewall.

Back to top Copyright © 2017 Alachisoft