Change your application: migrate from Azure Cache for Redis to KiviDB

The changes are the host, the port, the credentials and the CA certificate.

The changes are the host, the port, the credentials and the CA certificate.

Azure's port 6380 and KiviDB Cloud's port 6380 are both the TLS port, so a connection string to Azure Cache for Redis keeps its port. Two things differ: a self-hosted KiviDB listens for plain connections on 6380 by default (set --tls-port for TLS, and use that port), and Enterprise and Azure Managed Redis use port 10000.

.NET (StackExchange.Redis)

// Before: Azure Cache for Redis with an access key
var muxer = ConnectionMultiplexer.Connect(
    "my-cache.redis.cache.windows.net:6380,password=ACCESS_KEY,ssl=True,abortConnect=False");

// After: KiviDB Cloud
var options = ConfigurationOptions.Parse(
    "my-db.cloud.kividb.io:6380,user=kividbapp,password=KIVIDB_PASSWORD,ssl=True,abortConnect=False");
options.TrustIssuer("kividb-ca.pem");
var muxer = ConnectionMultiplexer.Connect(options);

If you used Microsoft Entra ID (ConfigureForAzureWithTokenCredentialAsync from Microsoft.Azure.StackExchangeRedis), remove that call and the package, and use the password.

Python (redis-py)

# Before: Azure Managed Redis, Enterprise cluster policy, access key
r = redis.Redis(host="my-cache.eastus.redis.azure.net", port=10000,
                password=os.environ["ACCESS_KEY"], ssl=True)

# After: KiviDB Cloud
r = redis.Redis(host="my-db.cloud.kividb.io", port=6380,
                username="kividbapp", password=os.environ["KIVIDB_PASSWORD"],
                ssl=True, ssl_ca_certs="kividb-ca.pem")

With the OSS cluster policy the application used RedisCluster; keep it only if the KiviDB target is sharded.

Node.js (ioredis)

// Before
const redis = new Redis(6380, "my-cache.redis.cache.windows.net", {
  password: process.env.ACCESS_KEY,
  tls: { servername: "my-cache.redis.cache.windows.net" },
});

// After
const redis = new Redis(6380, "my-db.cloud.kividb.io", {
  username: "kividbapp",
  password: process.env.KIVIDB_PASSWORD,
  tls: { ca: fs.readFileSync("kividb-ca.pem") },
});

Notes:

  • The CA certificate. Azure's certificates chain to a public authority. KiviDB Cloud's are issued by a private one: download the CA from Configuration and give it to the client. Connect by hostname.
  • Username. On KiviDB Cloud, send kividbapp with the password; the default user can only authenticate.
  • Module commands. FT.*, JSON.* and TS.* work in KiviDB; BF.*, CF.*, CMS.*, TOPK.* and TDIGEST.* answer ERR unknown command.