Encore embeds an in-memory Redis server directly inside its Rust runtime so that local development and tests require no external Redis installation. The team ported the Go-based miniredis library to Rust (~25,000 lines), implementing strings, hashes, lists, sets, sorted sets, streams, pub/sub, transactions, and Lua scripting. The embedded server speaks the full Redis wire protocol (RESP) over a TCP socket, making it indistinguishable from a managed Redis from the client's perspective. A runtime configuration flag determines whether to start the embedded server or connect to a real Redis cluster. To ensure behavioral parity, the Rust server is validated against miniredis's own Go integration test suite by comparing raw RESP responses byte-for-byte, which surfaced subtle differences like mock clock advancement and TLS certificate chain handling. The embedded server is strictly a development and testing fixture; production deployments use a real managed Redis.
Table of contents
An in-memory Redis, in the same processHow the runtime chooses where to connectKeeping it faithful to real RedisWhere this leaves local development38.5K Impressions1 Comment