Memurai - A Redis Alternative for Windows
Historically, developers searching for a supported Windows build of Redis have been out of luck. There is no official Windows build of Redis and most of the alternative choices all suffer from the same drawback: they’re not native Windows apps. Which means developers have been unable to fully integrate the most popular NoSQL data store into their Windows infrastructure and benefit from the performance and reliability that a native implementation provides.
Even the official Microsoft Open Tech port of Redis (which we helped to write) has been archived and is no longer supported. We think leaving Windows developers without a native solution sucks. And that’s why we decided to take the Redis source code and port it to run natively on Windows.
We call it Memurai.
What is Memurai
Memurai is a Redis 5-compatible cache and data store for Windows. It’s designed to provide the reliability and performance demanded by enterprise Windows environments. Just like Redis, Memurai uses an in-memory data set to achieve great performance at scale, and Memurai supports all the Redis features that you know and love, such as persistence, replication, transactions, LUA scripting, high-availability, pub/sub, cluster, modules, streams, and LRU eviction. In fact, Memurai supports all of the Redis API 5 eviction policies.
Because Memurai runs natively on Windows and uses the Windows APIs, it integrates seamlessly into your existing processes and workflows, allowing your team to quickly come up to speed with running a scalable NoSQL data store without needing to change their Windows infrastructure. And because it’s a regular Windows app, you can run Memurai as a Windows Service, making it perfectly suited to production environments.
The Memurai installation process is designed to be extremely easy and uses a standard MSI setup for installation and configuration.The configuration file syntax for Memurai is identical to Redis 5 syntax, apart from a few flags that are simply ignored by Memurai if present (mainly flags that are specific to Linux). Only flags from the Redis configuration file are supported and no new flags are introduced by Memurai. This means you don’t have to learn new tuning parameters, and any preexisting knowledge of configuring and tuning Redis applies directly to Memurai.
Just like Redis 5, Memurai supports multiple server roles. Configure Memurai to run with the sentinel role for high availability, improve scaling with the replica role, or use the cluster role to provide automatic partitioning of your data set. And as you’d probably expect at this point, each role is fully compatible with the Redis roles of the same name.
If you’re already running Redis instances on Linux, you can replicate data between Memurai and Redis, or use both Redis and Memurai within the same cluster. Running multiple instances of Memurai is no problem either and you can run more than one instance simultaneously (provided that you configure them to run on different ports).
For some Redis workloads, ensuring that your in-memory data set is safely written to disk is critical to ensuring the data set isn’t lost and that it can be quickly rebuilt if Redis restarts. Memurai supports persisting data to disk either synchronously or asynchronously. Internally, Redis uses the fork() system call to perform asynchronous writes, but that’s not an option for Memurai because fork() doesn’t exist on Windows. Instead, Memurai uses Windows shared memory to implement a start-of-the-art version of fork() that’s finely tuned for performance and allows Memurai to create data snapshots while still serving clients requests. Data can be written using the same AOF and RDB formats as Redis 5. RDB persists in-memory data to disk at specified intervals, and the AOF format is used to log every write operation received by the server, allowing Memurai to replay each log entry on startup to rebuild the in-memory data set.
Memurai comes with its own client, a command-line interface app known as memurai-cli.exe. But since Memurai is Redis-compatible and supports the full Redis 5 API, you’re able to use any redis client library to connect to Memurai and send commands. That includes using the official Redis CLI, redis-cli, on a Linux machine to connect a Memurai server running on Windows, or even connecting to a Redis instance on Linux with memurai-cli.exe.
But what if you’ve got favourite Redis modules that you want to use? Memurai supports the Redis 5 modules API too — Memurai was built to be a true drop-in replacement for Redis on Windows.
Where Can You Get It?
We’d love it if you gave Memurai a try. A free technical preview is available now, and you can send us your feedback at https://www.memurai.com/contact. We plan on making an announcement when a first official release is available.