n8n icon indicating copy to clipboard operation
n8n copied to clipboard

✨ Add Redis Sentinel support

Open pemontto opened this issue 2 years ago • 6 comments

This PR adds Redis Sentinel support for HA using the underlying functionality of the ioredis library. It will connect to one of the supplied sentinels and get the current master. You can provide sentinels in a comma separated list in <host>:<port> format.

  1. Connecting to a Sentinel
  2. Getting the list of other Sentinels for redundancy
  3. Connecting to the current master node image

Example config:

DEBUG=ioredis:* \
N8N_LOG_LEVEL=debug \
N8N_DIAGNOSTICS_ENABLED=false \
EXECUTIONS_MODE=queue \
QUEUE_BULL_REDIS_PASSWORD=passw0rd \
QUEUE_BULL_SENTINEL_ENABLED=true \
QUEUE_BULL_SENTINEL_SENTINELS="redis-sentinel-1:26379,redis-sentinel-2:26379,redis-sentinel-3:26379" \
./packages/cli/bin/n8n

You can also use a Sentinel password with QUEUE_BULL_SENTINEL_PASSWORD.

This is a first cut, I'm hoping to do more failure testing next week.

pemontto avatar Feb 03 '23 13:02 pemontto

Hey @pemontto,

Thanks for the PR 🙌🏻, I have created an internal ticket for the review which we will be tracking as N8N-6149

Joffcom avatar Feb 09 '23 17:02 Joffcom

We would like to see this implemented as well.

ghost avatar Feb 24 '23 00:02 ghost

Hi, any ETA for this feature ?

mickaelandrieu avatar Aug 16 '23 16:08 mickaelandrieu

Hey @mickaelandrieu,

No ETA at the moment, we are about to start looking into scaling in more detail though so it could be soon if we decide to stick with this approach.

Joffcom avatar Aug 16 '23 17:08 Joffcom

Any update here?

We run a shared Redis-Sentinel Cluster for our services and want to migrate to it, instead of running dedicated Redis instances...

the-nicolas avatar Jun 01 '24 10:06 the-nicolas

Same scenario as @the-nicolas, is there any help needed on this PR?

HaddadJoe avatar Jul 28 '24 10:07 HaddadJoe