toluaina / pgsync

Postgres to Elasticsearch/OpenSearch sync
https://pgsync.com
MIT License
1.14k stars 180 forks source link

Redis sentinel support #322

Open evstratbg opened 2 years ago

evstratbg commented 2 years ago

feature request

toluaina commented 2 years ago

Can you explain on what feature is required ?

evstratbg commented 2 years ago

sorry @toluaina, I thought its obvious from the title

currently, only connection to a master is supported. I'd propose to integrate Redis Sentinel for redis cluster support https://github.com/redis/redis-py/blob/master/redis/sentinel.py

from redis.sentinel import Sentinel
sentinel = Sentinel([('192.168.10.1', 26379), ('192.168.10.2',26379), ('192.168.10.3',26379)], socket_timeout=0.1)

master = sentinel.master_for('master-name', socket_timeout=0.1)
matt-takumi commented 1 year ago

We're migrating to Redis sentinel too, would be great to move pgsync with it!