Try Playground
Show / Hide Table of Contents

Keep-Alive

In an open connection, if a client is not requesting data from the server then the NCache client automatically closes the connection for better security and resource management.

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.

Keep-alive enabled

The keep-alive enabled 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, keep-alive enabled 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

In This Article
  • Keep-alive enabled
  • Keep-alive interval
  • 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