Brand new version of Hangfire.Pro.Redis is finally available. It is now based on feature-rich StackExchange.Redis library, allowing us to bring Hangfire to more environments that use Redis storage in the near future. This version comes with some new features, including SSL support and highly reduced connection usage.

What’s New

Support for SSL connections
You don't need use to private networking in public clouds anymore to build secure conversations with Redis.
Reduced connection usage
Due to StackExchange.Redis architecture, single multiplexed connection is used for all data queries, and separate connection is used for pub/sub. So you have 2 connections instead of 40.
Experimental .NET Core support
You can run your background processing with no Windows involved at all, on Linux or OS X platforms with .NET Core.
Optimized distributed locks
They are using sliding expiration now, to prevent us from long waits for lock release after unexpected process termination.

Previous version is deprecated now, new releases will contain only bug fixes.

Upgrading

New version uses the same storage schema, so breaking changes relate only to the library API. To upgrade your previous Hangfire.Pro.Redis installation, please read about the new configuration string format in the documentation, and update it in your project accordingly.

GlobalConfiguration.Configuration
    .UseRedisStorage("contoso5.redis.cache.windows.net,abortConnect=false,ssl=true,password=...");

Please note that since this release, Redis ≥ 2.6 is required.

.NET Core

Currently .NET Core support comes only with the separate version, 2.0.0-netcore. This is because StackExchange.Redis support for .NET Core is available only pre-release package, and NuGet doesn’t allow to build release packages with pre-release dependencies. Once StackExchange.Redis is released, I’ll remove this additional version. Here is an example reference in the project.json file:

{
    "dependencies": {
        "Hangfire.Pro.Redis": "2.0.0-netcore"
    }
}

Limitations

Despite of StackExchange.Redis library does support some of the following features, we can’t use them immediately. For example, to support high availability via master/slave replication, we should first implement the Redlock algorithm to ensure that distributed locks are working correctly in corner cases. For Cluster support, together with Redlock, we should ensure that subscriptions are working properly all the time.

So, multiple endpoints, Redis Cluster and Redis Sentinel aren’t supported yet.

Subscribe to monthly updates

Subscribe to receive monthly blog updates. Very low traffic, you are able to unsubscribe at any time.

Comments