Skip to main content
Swytch Documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Redis Compatibility

Connect with a Redis client using RESPv2 or RESPv3. Use a normal single-server connection to your local sidecar or the standalone Service endpoint.

Swytch supports Redis-shaped keys, lists, hashes, sets, sorted sets, JSON documents, streams, pub/sub, transactions, and scripting. Compatibility depends on the command and Swytch version; check the command reference against your application before switching traffic.

RedisJSON commands are built in; no separate module installation is needed. See JSON documents for examples.

Check these differences first

Application assumptionWhat to check
Redis Cluster routing or Sentinel discoveryConnect directly to Swytch; it manages its own peer discovery
Multiple numbered databasesOnly SELECT 0 is supported; use separate instances for isolation
RDB or AOF persistenceLocal durability uses Swytch’s own effect format and --data-dir; Redis persistence configuration does not apply
Redis modules or Lua librariesLua compatibility is best effort; prefer SSI transactions for new logic. Check unsupported features and scripting limits.
Transaction and retry behaviorDefault mode returns QUEUED. --ssi returns immediate snapshot results; use one connection and a client that accepts those replies. Test conflicts and retries.
Global scans as an inventoryNodes subscribe to data through use; validate enumeration against your topology
Asynchronous memory freeing with UNLINKUNLINK uses the same synchronous deletion path as DEL; it does not provide Redis-style background memory freeing.

Transactions without Lua

Enable swytch redis --ssi to read, branch in application code, and write within a serializable snapshot transaction. Changes stay private until EXEC; a confirmed conflict returns null and requires retrying the whole transaction. Lua is not required, and SSI transactions are recommended for new transactional logic. Existing scripts and functions have best-effort compatibility support.

The flag is disabled by default. Ordinary Redis transaction helpers often expect QUEUED and may buffer commands until EXEC; use a dedicated connection that sends commands and reads replies immediately. The transaction guide includes an interactive example and Python retry loop.

Start with data structures for usage examples or From Redis to Swytch for a staged rollout.

Redis is a trademark of Redis Ltd. Swytch is an independent project.