Search code examples
c#redisbooksleeve

Booksleve: what Redis version to use?


With reference to this post about Booksleeve and to the fact that there is not an official Windows Redis distribuition, what is the best practice? Is better to compile on Win32 or the "Unofficial" win32/64 distribuition is reliable and mantained ?


Solution

  • Booksleeve is just any-other-redis-client, and is rather orthogonal to the redis-server version/platform that you choose to use. Personally, I would only currently use the win32 implementations of redis-server as a local developer convenience. Production machines should probably use the linux build (we use ubuntu server, if it matters). The reason for this comes down to the simple fact that redis-server is designed to make use of the cheap linux fork/copy-on-write functionality to perform background saving (and possibly other functionality). Windows does not have such a fork, and the "linux on windows" implementations typically do a memory copy (pretty expensive, and may significantly impact how certain operations perform).

    Worse: at least one pure-windows version of redis-server simply substitutes a BGSAVE request for a SAVE request; on an busy server, this is death: SAVE is synchronous, and redis is single threaded, usually simply exploiting the fact that individual operations are so ridiculously fast, so that you wouldn't normally notice. However: if you suddenly get a SAVE request that takes 20 seconds, then your redis server is doing nothing else for those 20 seconds. When you are relying on replies that are typically around 0.3ms, this is a big problem.

    Microsoft have been working on a port of redis-server, and it may well be that this is now production ready; however, all things considered, for now I would rather stick with the primary, well-tested implementation on a linux server.

    But: for ad-hoc developer usage, any of the win32 builds should be fine.