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

Open Source Redis RESP Protocol Server on Windows

NCache Open Source provides a RESP listener that allows Redis-compatible clients to access a cache on Windows. The following procedure explains how to configure the listener for an NCache Open Source Replicated cache, connect from supported Redis client languages, and monitor basic cache activity. Unlike NCache, the Open Source edition does not support CRC16-based Redis Cluster routing.

Step 1: Install NCache Open Source on Windows

Install NCache Open Source on each Windows server that will host the Replicated cache.

  • Obtain an evaluation license key from the NCache Downloads page.
  • Open Command Prompt using Run as Administrator.
  • Run the following command, replacing the placeholder with your evaluation license key:
msiexec.exe /i http://download.alachisoft.com/ncache/ncache-oss-5.3.603.msi KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" /qn

For complete installation instructions, see Getting Started with NCache Open Source.

Step 2: Create a Replicated Cache

NCache Open Source supports Local and Replicated caches. The following example uses a Replicated cache named defaultCache on two nodes.

  • Configure defaultCache in %NCHOME%\config\config.ncconf on both servers (20.200.20.11 and 20.200.20.12).
  • Restart the NCache Service after updating the configuration, and verify the cache using PowerShell:
Get-Caches -Detail -Server 20.200.20.11

For the cache configuration XML and detailed instructions, see Create Cache.

Step 3: Enable NCache Open Source RESP Server

Configure the RESP listener on each cache server.

  • If defaultCache is running, stop it using PowerShell. Repeat for each node:
Stop-Cache -Name defaultCache -Server 20.200.20.11
  • Open %NCHOME%\config\resp.ncconf and add the following listener configuration for defaultCache:
<configuration>
  <resp-servers>
    <resp-server cache-id="defaultCache" enabled="true" port="9981" max-connections="1000" idle-timeout="0"/>
  </resp-servers>
</configuration>
  • Save the configuration on each server. Ensure that the selected port is available.

The following table describes the RESP listener attributes.

Attribute Description
cache-id Specifies the cache exposed through the RESP listener.
enabled Enables or disables the RESP listener for the specified cache.
port Specifies the TCP port used by Redis clients to connect to the listener.
max-connections Specifies the maximum number of client connections allowed.
idle-timeout Specifies the connection idle timeout, in seconds.
Note

The crc-enabled attribute is not supported in NCache Open Source and must be omitted from the RESP listener configuration. Redis-compatible CRC16 cluster routing is available only in NCache.

The example sets idle-timeout="0", disabling the idle connection timeout, and uses port 9981 from the reserved RESP range 9981–9989. Each listener on the same server requires an available port. For additional configuration details, see RESP Config (resp.ncconf). For stopping caches, see Stop-Cache.

Step 4: Start the Replicated Cache

Start the cache after saving the RESP listener configuration.

  • Open PowerShell and run the following command:
Start-Cache -Name defaultCache -Server 20.200.20.11
  • Repeat for the other server nodes and verify that the cache is running.

For more information, see Start-Cache and Get-Caches.

Step 5: Connect Redis Clients

Once the cache is running, connect to its RESP endpoint using redis-cli or a supported Redis client library. The examples use 20.200.20.11:9981 and assume that authentication and TLS are not enabled; when security is configured, supply the corresponding credentials and TLS options as described in NCache RESP Server Security.

Connect with redis-cli

Run the following command to verify that the RESP listener accepts Redis commands:

redis-cli -h 20.200.20.11 -p 9981 PING

A successful response is PONG. You can then use the Redis commands supported by NCache Open Source to access cache data.

Connect from Supported Client Languages

Use the following examples to connect with standard Redis client libraries. These examples demonstrate a connection and a PING command; install the corresponding client library in your application before running the code.

  • .NET
  • Java
  • Python
  • Node.js
using StackExchange.Redis;

// Connect to the NCache Open Source RESP listener.
using var redis = await ConnectionMultiplexer.ConnectAsync("20.200.20.11:9981");
var db = redis.GetDatabase();
Console.WriteLine(await db.PingAsync());
import redis.clients.jedis.Jedis;

// Connect and verify the RESP endpoint.
try (Jedis jedis = new Jedis("20.200.20.11", 9981)) {
    System.out.println(jedis.ping());
}
import redis

# Connect and verify the RESP endpoint.
client = redis.Redis(host="20.200.20.11", port=9981, decode_responses=True)
try:
    print(client.ping())
finally:
    client.close()
import { createClient } from 'redis';

// Connect and verify the RESP endpoint.
const client = createClient({ url: 'redis://20.200.20.11:9981' });
client.on('error', err => console.error('Redis Client Error', err));
await client.connect();
console.log(await client.ping());
await client.quit();

Before using additional Redis operations, refer to the Redis RESP Protocol Compatibility Matrix and check which commands are available in NCache Open Source. Redis Cluster clients that require CRC16 hash-slot discovery are not supported by the Open Source listener.

Step 6: Monitor NCache Open Source RESP Server

NCache Open Source RESP Server can be monitored through Windows Performance Monitor (PerfMon), supported PowerShell cmdlets, cache logs, and Windows Event Viewer. These tools help inspect cache availability, request activity, and errors, including activity generated by Redis clients. The reported counters represent overall cache activity rather than RESP-specific measurements. Refer to the following documentation for procedures and available features:

  • Monitor NCache
  • NCache Counters
  • Monitor NCache Using Windows PerfMon Tools
  • Monitor NCache Using PowerShell
  • Logging

See Also

Install and Configure NCache RESP Server
Connect Redis Applications to NCache RESP Server
Redis RESP Protocol Compatibility Matrix
Monitor NCache

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