Change your application: migrate from Valkey to KiviDB
Valkey clients speak the Redis protocol. valkey-py, iovalkey and the Redis clients connect to KiviDB unchanged: change the host, the port, the password, and…
Valkey clients speak the Redis protocol. valkey-py, iovalkey and the Redis clients connect to KiviDB unchanged: change the host, the port, the password, and TLS for KiviDB Cloud. Test any other client against KiviDB before the switch.
Python (valkey-py)
import os, valkey
# Before
r = valkey.Valkey(host="valkey.internal", port=6379, password=os.environ["VALKEY_PASSWORD"])
# After: KiviDB Cloud
r = valkey.Valkey(host="your-name.cloud.kividb.io", port=6380, username="kividbapp",
password=os.environ["KIVIDB_PASSWORD"], ssl=True, ssl_ca_certs="kividb-ca.pem")
Node.js (iovalkey, the same API as ioredis)
import fs from "node:fs";
import Valkey from "iovalkey";
// Before
const before = new Valkey({ host: "valkey.internal", port: 6379, password: process.env.VALKEY_PASSWORD });
// After: KiviDB Cloud
const client = new Valkey({
host: "your-name.cloud.kividb.io",
port: 6380,
username: "kividbapp",
password: process.env.KIVIDB_PASSWORD,
tls: { ca: fs.readFileSync("kividb-ca.pem") },
});
Valkey 9 HSETEX uses the same syntax as Redis 8, which KiviDB accepts:
HSETEX key EX 3600 FIELDS 1 field value.