Skip to content

KV (Redis) compatibility

Started with the explicit nimbus kv command; loopback-only RESP listener on 127.0.0.1:6380; authentication is mandatory.

The Nimbus KV listener speaks the Redis serialization protocol (RESP) over TCP. It implements the command surface listed on this page and nothing else: an unrecognized command is rejected with an ERR unknown command '<name>' error, and an unsupported subcommand or argument shape is rejected with an explicit error. Nothing is silently ignored.

This is a distinct surface from the Cloudflare Workers KV data plane. The Cloudflare KV binding is an HTTP-style namespace store documented on the Cloudflare compatibility reference; this page covers only the RESP wire listener started by nimbus kv.

The RESP surface is an early, bounded compatibility surface. It covers string and key operations only — there are no hash, list, set, sorted-set, stream, or pub/sub commands. It runs only as the explicit nimbus kv command, is not started by nimbus dev or nimbus start, and refuses any non-loopback bind address.

PropertyValue
Wire protocolRESP2 and RESP3, negotiated with HELLO
Protocol before HELLORESP2
Server identity (HELLO reply)RESP3: server nimbus-kv, version, proto, mode standalone, role master. RESP2: server nimbus-kv and proto only
Max buffered request1,048,576 bytes (1 MiB); a request that grows past this closes the connection
Network bindingLoopback only; a non-loopback bind is refused at startup

Authentication is required. Every data, connection, and introspection command is rejected with NOAUTH Authentication required until the connection authenticates. A connection authenticates with AUTH, or with HELLO carrying an AUTH clause.

CommandFormsNotes
AUTHAUTH password, AUTH username passwordA wrong pair returns WRONGPASS. The one-argument form matches the single configured credential by password.
HELLOHELLO 2, HELLO 3, either with AUTH username passwordSelects the protocol version for the connection; an unsupported version returns NOPROTO. Without a prior AUTH and without an AUTH clause, HELLO returns NOAUTH.
QUITQUITCloses the connection with OK when authenticated; NOAUTH otherwise.

A credential is bound to exactly one tenant. The connection operates entirely within that tenant’s keyspace.

Each command below requires an authenticated connection.

CommandFormsBehavior
GETGET keyReturns the value, or a null reply when the key is absent or expired.
SETSET key value, SET key value EX seconds, SET key value PX millisecondsStores the value. EX/PX set a relative expiry in seconds/milliseconds. Other options are rejected with a syntax error.
DELDEL key [key ...]Deletes one or more keys; returns the count actually removed.
INCRINCR keyIncrements the integer value by one; a missing key starts at zero. A non-integer value or an overflow is an error.
EXPIREEXPIRE key secondsSets a relative expiry. Returns 1 when applied, 0 when the key is absent.
TTLTTL keyRemaining time to live in seconds. -1 when the key has no expiry; -2 when the key is absent.
FLUSHALLFLUSHALL, FLUSHALL SYNC, FLUSHALL ASYNCClears the authenticated tenant’s keyspace. SYNC/ASYNC are accepted and behave identically.
CommandFormsBehavior
PINGPING, PING messageReturns PONG, or echoes the message.
ECHOECHO messageReturns the message.
SELECTSELECT 0, SELECT <bound-tenant-id>Accepts logical database 0 or the connection’s bound tenant id. Any other value is rejected; SELECT cannot change tenant.
CLIENTCLIENT SETINFO ...SETINFO returns OK. Other CLIENT subcommands are rejected.
COMMANDCOMMANDReturns an empty array.
FUNCTIONFUNCTION FLUSH [SYNC|ASYNC]FLUSH returns OK. Other FUNCTION subcommands are rejected.
NIMBUS.READYNIMBUS.READYReturns READY.
NIMBUS.METRICSNIMBUS.METRICSReturns a text metrics dump for the listener.

The listener stores each tenant’s keyspace through the Nimbus storage layer. nimbus kv selects one of three modes:

ModeFlagBehavior
DurabledefaultA redb file per tenant, fronted by a read-through cache.
Durable without cache--no-cacheDurable redb storage with the read-through cache disabled.
In-memory--no-diskState kept in memory only; nothing is written to disk.

--maxmemory sets an approximate byte budget for the read-through cache; --no-disk and --no-cache cannot be combined.

The listener serves one tenant per credential. Keys, expiries, and FLUSHALL are scoped to the authenticated tenant, and SELECT cannot cross that boundary. Run separate nimbus kv credentials, or separate listeners, for separate tenants.