Redis (compat)
Tested with: Redis (compat) 7.2 on Databasezy · zb CLI 0.1
Redis (compat) is a Redis 7.2 server for applications that need a server that reports itself as Redis. For new work, use Valkey: it speaks the same protocol, is newer and runs on the Free plan.
Overview
Section titled “Overview”Each instance runs the official Redis 7.2 image (7.2.16) as a single node. Persistence is on: the append-only file (AOF) records
every write, and an RDB snapshot is written when at least 1,000 keys change in 60 seconds. Authentication uses the
built-in default user with a generated password, and connections are TLS-only.
| Status | Available |
|---|---|
| Category | Key-value |
| Versions | 7.2 (newest is the default) |
| Protocol and port | RESP (Redis protocol) on 6379 |
| Runtime | Single-node engine (redis) |
| Backups | RDB + AOF |
| Point-in-time recovery | No |
| Pause | Scale to zero |
| Free plan | No, paid plans only |
| Licence | BSD-3-Clause |
When to use it
Section titled “When to use it”- Your application or a library checks
INFO serverforredis_versionand refuses to run against Valkey. - You are lifting an application off Redis 7.x (or 6.x) and want no server-side changes during the move.
Pick Valkey for everything else. It forked from Redis 7.2, keeps the RESP protocol and every Redis client library, adds newer commands and runs on the Free plan.
Create an instance
Section titled “Create an instance”- Open the portal and choose New instance.
- Pick Redis (compat) and a version (7.2).
- Choose a size and region. Secure placement is listed only after your organization has signed the BAA.
- Check the hourly price and monthly estimate, then confirm. The Connect tab fills in when the instance is ready.
zb instances create --engine redis --engine-version 7.2 \ --size s1 --region us-east --name redis-demo --wait
# Reveal the credentials once and store them in your secret managerzb instances credentials reveal redis-democurl -sS https://api.databasezy.com/v1/orgs/$ZB_ORG/projects/$ZB_PROJECT/instances \ -H "Authorization: Bearer $ZB_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "engine": "redis", "engine_version": "7.2", "size": "s1", "region": "us-east", "name": "redis-demo"}'
The response is 201 with the instance in status requested, or 202 when a
team approval policy applies. See the REST API reference.
Connect
Section titled “Connect”Endpoint and credentials
Section titled “Endpoint and credentials”| Host | redis-<id>.<region>.databasezy.com, for example redis-7f3k.us-east.databasezy.com |
|---|---|
Port 6379 | RESP (Redis protocol) |
| TLS | Required on every port; plaintext is refused. Verify the server: rediss:// or --tls with hostname checking. |
| Credentials | Username default and a generated password, presented as AUTH (ACL user default and password). Shown once at creation; reveal or rotate it from the Connect tab. |
Use rediss:// URLs or your client’s TLS option with hostname checking. The username is default; most clients also
accept the password on its own, which authenticates the default user.
Drivers and clients
Section titled “Drivers and clients”Redis (compat) listens on port 6379 (RESP (Redis protocol)). Versions: 7.2. Replace the example host with the one on your instance's Connect tab; credentials are shown once at creation.
rediss://default:<password>@redis-7f3k.us-east.databasezy.com:6379/0import { readFileSync } from "node:fs";import Redis from "ioredis";
const host = "redis-7f3k.us-east.databasezy.com";export const redis = new Redis({ host, port: 6379, username: "default", password: process.env.ZB_PASSWORD, tls: { ca: readFileSync("databasezy-ca.pem", "utf8"), servername: host, // hostname verification rejectUnauthorized: true, }, maxRetriesPerRequest: 3,});
await redis.set("hello", "world", "EX", 60);console.log(await redis.get("hello"));Tested with: Redis (compat) 7.2 · ioredis 5.4
import osimport valkey # or: import redis as valkey
r = valkey.Valkey( host="redis-7f3k.us-east.databasezy.com", port=6379, username="default", password=os.environ["ZB_PASSWORD"], ssl=True, ssl_cert_reqs="required", ssl_ca_certs="databasezy-ca.pem", ssl_check_hostname=True, decode_responses=True,)r.set("hello", "world", ex=60)print(r.get("hello"))Tested with: Redis (compat) 7.2 · valkey-py 6.0 (redis-py 5.x compatible)
package main
import ( "context" "crypto/tls" "crypto/x509" "fmt" "os"
"github.com/valkey-io/valkey-go")
func main() { pem, _ := os.ReadFile("databasezy-ca.pem") roots := x509.NewCertPool() roots.AppendCertsFromPEM(pem)
client, err := valkey.NewClient(valkey.ClientOption{ InitAddress: []string{"redis-7f3k.us-east.databasezy.com:6379"}, Username: "default", Password: os.Getenv("ZB_PASSWORD"), TLSConfig: &tls.Config{RootCAs: roots, ServerName: "redis-7f3k.us-east.databasezy.com", MinVersion: tls.VersionTLS12}, }) if err != nil { panic(err) } defer client.Close()
ctx := context.Background() client.Do(ctx, client.B().Set().Key("hello").Value("world").Ex(60*1e9).Build()) v, _ := client.Do(ctx, client.B().Get().Key("hello").Build()).ToString() fmt.Println(v)}Tested with: Redis (compat) 7.2 · valkey-go 1.0 (go-redis v9 works the same)
use redis::{AsyncCommands, Client, TlsCertificates};
#[tokio::main]async fn main() -> redis::RedisResult<()> { let pw = std::env::var("ZB_PASSWORD").expect("ZB_PASSWORD"); let url = format!("rediss://default:{pw}@redis-7f3k.us-east.databasezy.com:6379/0"); let certs = TlsCertificates { client_tls: None, root_cert: Some(std::fs::read("databasezy-ca.pem").expect("read CA")), }; let client = Client::build_with_tls(url, certs)?; let mut conn = client.get_multiplexed_async_connection().await?; conn.set_ex::<_, _, ()>("hello", "world", 60).await?; let v: String = conn.get("hello").await?; println!("{v}"); Ok(())}Tested with: Redis (compat) 7.2 · redis 0.27 (tokio-rustls-comp)
// One-time: keytool -importcert -noprompt -alias databasezy -file databasezy-ca.pem \// -keystore databasezy-truststore.p12 -storetype PKCS12 -storepass changeitimport io.lettuce.core.RedisClient;import io.lettuce.core.RedisURI;import io.lettuce.core.SslOptions;import io.lettuce.core.ClientOptions;import java.io.File;
public final class Cache { public static void main(String[] args) { var uri = RedisURI.Builder.redis("redis-7f3k.us-east.databasezy.com", 6379) .withSsl(true) .withVerifyPeer(true) // chain + hostname .withAuthentication("default", System.getenv("ZB_PASSWORD").toCharArray()) .build(); var client = RedisClient.create(uri); client.setOptions(ClientOptions.builder() .sslOptions(SslOptions.builder() .truststore(new File("databasezy-truststore.p12"), "changeit").build()) .build()); try (var conn = client.connect()) { conn.sync().setex("hello", 60, "world"); System.out.println(conn.sync().get("hello")); } client.shutdown(); }}Tested with: Redis (compat) 7.2 · Lettuce 6.5
using StackExchange.Redis;
var options = new ConfigurationOptions{ EndPoints = { { "redis-7f3k.us-east.databasezy.com", 6379 } }, User = "default", Password = Environment.GetEnvironmentVariable("ZB_PASSWORD"), Ssl = true, SslHost = "redis-7f3k.us-east.databasezy.com", // hostname verification};// If the CA is not in the OS store, trust it explicitly:options.TrustIssuer("databasezy-ca.pem");
var mux = await ConnectionMultiplexer.ConnectAsync(options);var db = mux.GetDatabase();await db.StringSetAsync("hello", "world", TimeSpan.FromSeconds(60));Console.WriteLine(await db.StringGetAsync("hello"));Tested with: Redis (compat) 7.2 · StackExchange.Redis 2.8
<?php$client = new Predis\Client([ "scheme" => "tls", "host" => "redis-7f3k.us-east.databasezy.com", "port" => 6379, "username" => "default", "password" => getenv("ZB_PASSWORD"), "ssl" => ["cafile" => "databasezy-ca.pem", "verify_peer" => true, "verify_peer_name" => true],]);$client->setex("hello", 60, "world");echo $client->get("hello");Tested with: Redis (compat) 7.2 · predis 2.3
require "redis"
redis = Redis.new( url: "rediss://default:#{ENV.fetch('ZB_PASSWORD')}@redis-7f3k.us-east.databasezy.com:6379/0", ssl_params: { ca_file: "databasezy-ca.pem", verify_mode: OpenSSL::SSL::VERIFY_PEER })redis.set("hello", "world", ex: 60)puts redis.get("hello")Tested with: Redis (compat) 7.2 · redis-rb 5.3
redis-cli --tls --cacert databasezy-ca.pem -h redis-7f3k.us-east.databasezy.com -p 6379 --user default --askpass
# orzb connect redis-7f3kTested with: Redis (compat) 7.2 · redis-cli 7.2
Every Redis client library works, including ioredis, redis-py, go-redis, Lettuce, Jedis and StackExchange.Redis. The Valkey connection guide covers TLS, timeouts and connection pools in more depth; it applies unchanged to Redis (compat).
See Connecting to Databasezy for the CA bundle, the IP allow-list and credential rotation, which work the same for every engine.
Migrate in
Section titled “Migrate in”| Source | How | Continuous sync | Guide status |
|---|---|---|---|
| Redis Cloud | Connection string, File upload | No | Coming soon · phase 2 |
| Self-hosted server | Connection string, Local tools (zb migrate --from local) | No | Available |
| Local files and dumps | File upload, Local tools (zb migrate --from local) | No | Available |
| Docker container | Local tools (zb migrate --from local) | No | Available |
| Another Databasezy instance | Instance to instance | No | Coming soon · phase 2 |
Keys are copied from the source into the new instance with their TTLs. There is no continuous sync, so stop writes (or accept that writes made during the copy are lost) before cutover. Moving later from Redis (compat) to Valkey is an instance-to-instance conversion; see engine conversions.
How migrations work explains preflight, verification and cutover, and engine conversions covers moves between compatible engines.
Backups and restore
Section titled “Backups and restore”Backups copy the RDB snapshot and the append-only file to object storage. A restore returns the data as of that backup.
Redis (compat) backups use RDB + AOF. They run inside the instance's namespace, stream straight to the cell's object storage and are checksummed on upload. How often they run and how long they are kept follows your plan's backup policy. A backup is always taken before a resize or a version upgrade.
Point-in-time recovery is not available for Redis (compat). A restore returns the data as of a scheduled or manual backup. Restores create a new instance by default and leave the original untouched; an in-place restore asks you to type the instance name and takes a pre-change backup first.
zb backups create redis-demo --label before-release # manual snapshotzb backups list redis-demozb backups restore redis-demo <backup-id> --name redis-demo-restorePause and scale to zero
Section titled “Pause and scale to zero”Redis (compat) can scale to zero. A paused instance has no running pods and bills no compute; its storage and backups are kept and billed as usual. Connections are refused until you resume it.
zb instances pause redis-demozb instances resume redis-demoSee Pause and resume for schedules, wake times and billing while paused.
Limits, versions and lifecycle
Section titled “Limits, versions and lifecycle”Versions and lifecycle
Section titled “Versions and lifecycle”- Supported versions:
7.2. New instances default to7.2, the only version offered. - Minor and patch releases are applied for you in the maintenance window, always after a pre-change backup.
- New majors are added within 60 days of the upstream release. A major reaches end of life on Databasezy six months after upstream ends support, with notices 90, 30 and 7 days ahead.
Sizes and limits
Section titled “Sizes and limits”Redis (compat) is not offered on the Free plan; it runs on the paid sizes below. The size sets the CPU, memory, storage ceiling and connection limit; the gateway refuses connections over the limit with a protocol error. Storage grows in steps up to the ceiling, and you can resize at any time.
| Size | vCPU | Memory | Max storage | Max connections | ≈ $ / month |
|---|---|---|---|---|---|
s0 | 0.25 | 1 GiB | 20 GB | 60 | $10 |
s1 | 0.5 | 2 GiB | 50 GB | 100 | $15 |
s2 | 1 | 4 GiB | 200 GB | 200 | $60 |
m2 | 2 | 8 GiB | 500 GB | 400 | $110 |
m4 | 4 | 16 GiB | 1 TB | 800 | $210 |
l8 | 8 | 32 GiB | 4 TB | 1,500 | $410 |
l16 | 16 | 64 GiB | 8 TB | 3,000 | $960 |
xl32 | 32 | 128 GiB | 16 TB | 5,000 | $1,870 |
Full details, including hourly prices and burst CPU, are in the size catalogue; plan quotas are in limits and quotas.
Memory is the real limit for an in-memory store. Each instance caps its dataset at 75% of the size’s memory
(maxmemory, policy noeviction): when it is full, writes fail with OOM command not allowed when used memory > 'maxmemory' and keys are never evicted; the rest covers buffers and the append-only file rewrite. Watch used_memory
in INFO memory and resize before you approach the cap. Redis modules
are not loaded, so Redis Stack commands (JSON.*, FT.*, TS.*, BF.*) are not available.
Licence
Section titled “Licence”Databasezy runs Redis (compat) under the BSD-3-Clause licence, as listed in the engine catalogue. This engine is licence-gated: only the release line named in the catalogue may be offered as a managed service, so newer upstream releases are not added. Your data and schemas are yours whatever the server's licence; the licence governs the server software we run.
Security
Section titled “Security”- TLS on every connection. TLS 1.2 is the minimum and TLS 1.3 is preferred; plaintext is never
offered. Verify the server, not just the encryption: use
rediss:// with hostname checking. See TLS and the CA bundle. - IP allow-list. The gateway checks the client address before authentication, on every plan.
Manage it under Network → Allow-list in the portal or with
PUT /v1/orgs/{org}/instances/{id}/network. - Credentials. Generated inside the cell, shown once, never stored by the control plane. Rotate them with an overlap window so nothing breaks.
- Secure hosting. Secure placement (HIPAA-ready) is a per-instance option once your organization has signed the BAA: dedicated nodes, customer-managed keys and immutable backups. See Secure hosting and the BAA.
- Staff access. Databasezy staff cannot read your data without a grant you issue. See data confidentiality.
Why only Redis 7.2?
Section titled “Why only Redis 7.2?”It is the newest BSD-licensed Redis line, and the one the catalogue allows. Later Redis releases use licences we do not offer as a managed service. Valkey continues the BSD-licensed code base and gets new releases.
Valkey or Redis (compat)?
Section titled “Valkey or Redis (compat)?”Valkey, unless your application checks the server name or version and refuses to run otherwise. Valkey has more commands, is maintained and runs on the Free plan.
Is Redis (compat) on the Free plan?
Section titled “Is Redis (compat) on the Free plan?”No. It is a paid-plan engine. Valkey is available on the Free plan.