• 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

Configuring Communication Reliability

NCache provides communication reliability through features of Command Retry and Inquiry to ensure the communication and execution of any commands that may have not been performed because of buggy networks or firewalls that block the connection with the server.

These features rely on the distinctive rule that certain commands change the state of the cache. These commands are referred to as unsafe commands, and once performed, cannot be performed again. On the other hand, we have commands that can be safely performed on the cache repeatedly without changing the state of the cache. These are referred to as safe commands. The command retries works for safe commands whereas the request inquiry works for unsafe commands.

Command Retries

Command retries, as the name indicates, retries execution of a command once the connection between the client and the cache server is broken which can result in one of the following scenarios:

  • The request containing the command was being sent when the connection broke, and the request never reached the server.

  • The request containing the command was successfully sent to the server but there is uncertainty whether the request was entertained or not when the connection broke.

Hence, if it is certain that the connection was broken before the request was sent to the server, the command is retried as the request is resent to the server.

In case of uncertainty, the command’s status is checked whether it is safe or unsafe.

  • If the command is safe, the command is simply retried.

  • If it is unsafe, an inquiry is made to another server node in the cache cluster to check the status of the request. Action is then taken according to the response from the request inquiry which returns the state of the request at the server. Request Inquiry is explained further in the chapter.

The user can configure how many retries should be made for each command and the time interval between them in seconds.

Command retries and their interval can be enabled through the <ncache-server> tag in client.ncconf in %NCHOME%\config. By default, the command retries are set to 3, and the interval to 0.1 seconds.

   <ncache-server ... command-retries="3" command-retry-interval="0.1" ... />

Request Inquiry

Request Inquiry logs all the client requests containing the unsafe commands on the server side on the receiving node. This is used to ensure fault tolerant and reliable communication between client and the cluster. In case of connection breakup, a client can inquire the cluster for the status of an unsafe command in a request that apparently might have failed. The status of the failed requests can be either of the following:

Response from Request Inquiry Action Taken
Request not received by server node Command Retry
Request received but not yet processed Wait for the request to be processed and inquire again
Request processed Send the response of the completed request in response to the inquiry

If request inquiry is disabled and an unsafe command fails, an exception is thrown asking to enable the feature if any future unsafe commands are to be made reliable. By default, the request inquiry is disabled.

Request Inquiry is a node specific setting and can be enabled through the following property in Alachisoft.NCache.Service.exe.config in %NCHOME%\bin\service:

<add key="NCacheServer.EnableRequestInquiry" value="False"/>

The requests containing the unsafe commands remain logged at the server side until they are acknowledged by the client. The client piggybacks the identifier of the acknowledged request on the next request. Upon reception of the acknowledgement, the server clears the request logs preceding the acknowledged one. Although there can occur a case when request log is never cleared. For that case, each log has a natural expiration time which can be modified through the following property in service.exe.config in %NCHOME%\bin\service:

<add key="NCacheServer.RequestInquiryCleanInterval" value="15"/>
Back to top Copyright © 2017 Alachisoft