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

Keep Alive

In the context of distributed caching, having a stable network state is an important aspect. The Keep Alive property in NCache is a connectivity tool that prevents the automatic closure of idle client-server sockets. By sending periodic heartbeats over open connections, NCache prevents stateful firewalls and load balancers from closing idle paths, thus providing a constant communication channel for low-latency data access.

Note

This feature can be enabled via manually editing the client.ncconf file and is disabled by default. Alternatively, you can also employ the CacheConnectionOptions API, by setting EnableKeepAlive to true and establishing a KeepAliveInterval.

Enable Keep Alive

The enable-keep-alive property specifies whether the connection between the client and server should be kept "alive", i.e., if the client is not communicating with its connected servers, the enable-keep-alive property sends heartbeats or pings from the client to server nodes at fixed intervals. This feature is particularly useful if there is a firewall which breaks idle network connections or if it detects connection breakages proactively.

<configuration>
  <ncache-server connection-retries="3" ... enable-keep-alive="true" keep-alive-interval="30" />
  <cache ...>
  </cache>
</configuration>
Note

The default value of connection-retries is 3, though you can change it as you feel appropriate. You can read more about connection retries, here.

Keep Alive Interval

The keep-alive-interval is the interval, in seconds, after which a heartbeat is sent from the idle client to server to sustain the connection. The interval ranges between 1 and 7200 seconds with default set at 30 seconds. If any value is specified out of the range, NCache resorts to using the default value.

See Also

Client Config (client.ncconf)
Communication Reliability
Cache Settings

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