Reading from slaves with JedisSentinelPool

640 views
Skip to first unread message

Gustavo Garcia

unread,
May 29, 2014, 11:51:32 PM5/29/14
to jedis...@googlegroups.com
Is there any support or recommended way to use JedisSentinelPool but always reading for the slaves while still writing to the master?

Thx a lot

Jonathan Leibiusky

unread,
May 31, 2014, 10:11:49 AM5/31/14
to jedis...@googlegroups.com

You can create a pool with only slaves and another one with your master.

On May 29, 2014 10:59 PM, "Gustavo Garcia" <g...@tokbox.com> wrote:
Is there any support or recommended way to use JedisSentinelPool but always reading for the slaves while still writing to the master?

Thx a lot

--
You received this message because you are subscribed to the Google Groups "Jedis" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jedis_redis...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gustavo Garcia

unread,
May 31, 2014, 12:51:56 PM5/31/14
to jedis...@googlegroups.com
Thank you Jonathan. But that way I have to implement the discovery
of slaves and the detection of slaves down/up myself, right? If there
is no other way I will try to implement it in JedisSentinelPool and
submit a patch in case anybody else is interested.

G.

임정택

unread,
Jun 1, 2014, 2:50:10 AM6/1/14
to jedis...@googlegroups.com
Hello.

Actually many users requested to query offloading from JedisSentinelPool.
So it would be great feature for Jedis if you implement and request for pull.

Btw, in fact it was not implemented because of Redis Sentinel's behavior.
Redis Sentinel doesn't check ODOWN to slaves and sentinels.
So we can discovery slaves but have to check availability or lean on SDOWN, which is not a good idea, before using slaves.

I've replied same kind of question you can reference to - https://groups.google.com/d/msg/jedis_redis/6UgoWVKhpIM/Qmu3Y3caRncJ

Hope this helps.

Regards.
Jungtaek Lim (HeartSaVioR)

2014년 6월 1일 일요일 오전 1시 51분 56초 UTC+9, Gustavo Garcia 님의 말:
Reply all
Reply to author
Forward
0 new messages