Skip to content

Commit 72529b7

Browse files
committed
Add section regarding Redis Sentinel support
1 parent 0d8a36b commit 72529b7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

configuration/using-redis.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,16 @@ Since Hangfire requires transactions, and Redis doesn't support ones that span m
110110
111111
This will bind all the keys to a single Redis instance. To be able to fully utilize your Redis cluster, consider using multiple ``JobStorage`` instances and leveraging some load-balancing technique (round-robin is enough for the most cases). To do so, pick different hash tags for different storages and ensure they are using hash slots that live on different masters by using commands ``CLUSTER NODES`` and ``CLUSTER KEYSLOT``.
112112

113+
Redis Sentinel support
114+
~~~~~~~~~~~~~~~~~~~~~~
115+
116+
Starting from Hangfire.Pro.Redis 3.1.0, it is possible to connect to one or more Redis Sentinel instances, once `serviceName` parameter is specified in the connection string. Once connected, the client will determine the actual nodes for the specified service, and establish corresponding connections. In case of master changes, or connection problems with either Sentinel or regular Redis endpoints, connections will be automatically re-established.
117+
118+
.. code-block:: csharp
119+
120+
GlobalConfiguration.Configuration.UseRedisStorage(
121+
"sentinel1:10000,sentinel2:10000,sentinel3:10000,serviceName=mymaster");
122+
113123
Passing options
114124
~~~~~~~~~~~~~~~
115125

0 commit comments

Comments
 (0)