Skip to main content

The wire and Redis compatibility

Structures speaks RESP2 and RESP3, the Redis protocol, over a raw TCP socket. redis-cli connects to it. So do the standard Python, Node, Go and Java client libraries, unchanged.

That is the adoption argument in one line: keep your clients, keep your command vocabulary, and gain everything a cache does not give you.

What a client gets​

PropertyDetail
RESP2 and RESP3Both protocol generations, selected with HELLO
Per-connection registrationClient state is registered once per connection, not per command, so transactions, watches and protocol state persist across a session the way a Redis client expects
Cluster semanticsThe Redis Cluster model: CRC16 over 16,384 slots, {hashtag} co-location for related keys, and MOVED and CROSSSLOT responses
KeyDB extensionsThree commands beyond baseline Redis, enumerated below
ScriptingServer-side scripting with SHA-based caching and function libraries
Pub/sub and keyspace notificationsChannel, pattern and sharded pub/sub, with an in-process dispatcher, a keyspace notifier, and cross-cell fan-out for sharded channels

The cluster semantics matter more than they look. A client library that already understands MOVED will follow a redirect to the owning cell without special handling, which is what makes multi-cell placement transparent to an application that was written against Redis Cluster.

What a Redis client can and cannot do​

The useful question is not "is it Redis-compatible" but "where is the ceiling". Here is the explicit picture.

Supported commands and types​

The engine registers over 360 type commands, plus the connection and server commands a client library needs to function. The coverage is wide.

AreaCovered
Core typesStrings, hashes, lists, sets and sorted sets, with their full command families including the blocking list and sorted-set pops (BLPOP, BLMOVE, BZPOPMIN and relatives)
StreamsThe full stream surface including consumer groups: XADD, XREAD, XRANGE, XREADGROUP, XACK, XCLAIM, XAUTOCLAIM, XPENDING, XGROUP, XINFO, XTRIM
Bitmaps and HyperLogLogSETBIT, BITCOUNT, BITFIELD, BITOP, BITPOS; PFADD, PFCOUNT, PFMERGE
GeospatialGEOADD, GEODIST, GEOSEARCH, GEOSEARCHSTORE and relatives
Generic key commandsDEL, EXISTS, the EXPIRE and TTL families, TYPE, SCAN, KEYS, RENAME, COPY, OBJECT, TOUCH, UNLINK, RANDOMKEY, DBSIZE
TransactionsMULTI, EXEC, DISCARD, WATCH, UNWATCH
ScriptingEVAL, EVALSHA, SCRIPT, FUNCTION, FCALL
Pub/subSUBSCRIBE, PSUBSCRIBE, UNSUBSCRIBE, PUNSUBSCRIBE, the sharded family SSUBSCRIBE, SPUBLISH, SUNSUBSCRIBE, and PUBSUB including SHARDCHANNELS and SHARDNUMSUB, plus keyspace notifications
Connection and serverPING, ECHO, HELLO, SELECT, AUTH, QUIT, RESET, CLIENT, COMMAND, CONFIG, SLOWLOG, INFO, SAVE, BGSAVE, LASTSAVE, CLUSTER, WAIT, WAITAOF
Redis Stack module surfaceThe same command namespaces the Redis Stack modules use: JSON documents (JSON.*), search and indexing (FT.*), time series (TS.*), and the probabilistic sketches (BF.*, CF.*, CMS.*, TOPK.*, TDIGEST.*)
System9 type familiesCommands with no Redis equivalent, for the types that extend past the Redis surface: vectors (VADD, VSIM), tensors, dataframe structures (FRAME.*), graphs (GRAPH.*), the CRDT family (CRDT.*), Merkle logs, bitemporal records, intervals, trees, roaring bitmaps, HyperMinHash and DDSketch

The KeyDB extensions​

Beyond baseline Redis the engine implements three KeyDB commands, and these are the whole set, not an open-ended "and more":

CommandWhat it does
OBJECT LASTMODIFIED keySeconds since the key was last written, or -1 if it does not exist
BITOP LSHIFT key nLeft bitwise shift of the string value by n bits, in place
BITOP RSHIFT key nRight bitwise shift of the string value by n bits, in place

The compatibility ceiling​

A standard client works unchanged, within these boundaries.

  • Authentication is not optional on an authenticated listener. Before a connection authenticates, only AUTH, HELLO, QUIT and RESET are accepted; anything else is refused with -NOAUTH. The connection binds to a verified directory entity, not to a shared password.
  • Every command is authorized. A command can be denied per command even on a valid, authenticated connection, because it re-enters the engine-boundary authorizer with workspace scope, classification and grants. Vanilla Redis has no equivalent refusal, so a client must handle an authorization error on a command it was allowed to send.
  • Subscriber mode is restricted, as in Redis. While a RESP2 connection is in subscriber mode it may issue only the subscribe and unsubscribe commands plus PING, QUIT and RESET. Sharded pub/sub is part of the surface alongside channel and pattern pub/sub: SSUBSCRIBE, SPUBLISH, SUNSUBSCRIBE, with PUBSUB SHARDCHANNELS and SHARDNUMSUB answered from real state. A sharded-channel publish delivers locally and fans out to the other cells that own the channel's slot, over the same peer transport and replica placement the write path uses, loop-free. Sharded channels occupy a disjoint channel space from regular channel and pattern pub/sub.
  • Cross-cell sharded pub/sub has two boundaries. Message payloads cross the peer transport UTF-8-decoded, so cross-cell sharded pub/sub is not binary-clean, a pre-existing structure-replication limitation. And the cross-cell fan-out is proven on the in-process multi-cell tier; the live-wire sovereign-corner proof is owed.
  • WAIT blocks on real replica acknowledgment. A per-slot acknowledgment registry tracks which replica cells have acknowledged up to a sequence number, and WAIT blocks, bounded by its timeout, until the requested number of replicas have acknowledged, returning the achieved count rather than a canned zero. On a single cell, with no replicas, or for a non-blockable client, it returns the current count immediately rather than hanging. WAITAOF's replica half runs on the same mechanism; its local-durability count reports that a write reached the append-only log, not a per-write fsync-to-checkpoint confirmation, and a precise per-write fsynced offset is owed. The engine's own log and replication path are described in Persistence and distribution.
  • CONFIG is a bounded parameter set. The server answers a defined allowlist of parameters (including maxmemory, maxmemory-policy, the slowlog-* pair, appendonly and notify-keyspace-events), not the entire Redis configuration surface.
  • Protocol limits are hard and Redis-shaped. A request is capped at 1,048,576 multibulk elements and 512 MiB per bulk string. A malformed frame closes the connection with a typed protocol error rather than being silently dropped.

The wire is not an authorization bypass​

This is the property that makes the compatibility safe to offer, and it is the first question a security reviewer should ask.

A standard Redis client connecting directly does not find an ungoverned back door:

  1. The connection is deny-by-default until it authenticates.
  2. The connection binds to a verified directory entity, not to a shared password.
  3. Every command re-enters the same engine-boundary authorizer the HTTP surface uses.

So a GET over RESP is subject to the same workspace scope, the same classification and the same grants as the equivalent call over HTTP. The protocol determines the syntax, not the authority.

Figure: the Redis wire, governed. Connecting is not authorization. The connection authenticates and binds to a directory entity, and then every command crosses the same authorizer an HTTP caller crosses.

Other ways in​

The wire is the compatibility surface, not the only one.

SurfaceFor
RESP2 / RESP3Existing Redis clients and tooling
An external HTTP faceCredential-authenticated callers that do not speak RESP
An in-process workspace clientCo-located callers inside the cell, including agents
An operator surfaceBrowsing and administering structures from the console
Agent toolsQuery and execute verbs exposed to a reasoning agent, including on a disconnected device

All of them land on the same engine behind the same authorizer.

What you gain over a cache​

The same set or sorted set that would sit in an ungoverned cache becomes, here:

  • Workspace-scoped, so it belongs to a boundary rather than to a shared namespace.
  • Classified, on the same ladder as a table.
  • Authorized per command, against real grants.
  • Audited, into the same record as everything else.
  • Replicated across cells, with conflict-free convergence.
  • Metered, so its consumption is attributable.

A cache gives you none of those, which is why a cache is where governance quietly ends in most estates.