Redis Sentinel with read from Slaves write to Master?
PHP中文网
PHP中文网 2017-04-25 09:03:39
0
0
638

这个问题直接从stackoverflow搬运的,跟我想问的一模一样,但是目前没有答案
Our current Redis setup is a Web application client using Jedis to directly connect using one JedisPool for writes to a single Redis master and a second JedisPool for reads from a single Redis slave. The slave is setup to replicate the master.
We are in the process of moving to using the JedisSentinelPool on the client and introducing Sentinel(s) to handle failover more cleanly. As far as I know, it seems that the JedisSentinelPool only communicates with the currently elected master, so now all writes/reads go to the master. Compared to before when the reads could be distributed to the slave.
Is there any way using JedisSentinelPool to distribute the reads to the slave for load balancing purposes? Or it is necessary to implement this manually with a JedisPool (as before) In which case if the master failed, the JedisSentinelPool would now point to the old slave (new master) and the JedisPool would still dumbly point to the old slave, and effectively the old slave (new master) would now be handling reads AND writes?
Does the Redis Sentinel (or otherwise) have any load balancing (as opposed to failover) capabilities? We currently only have one slave, could adding more slaves be used for load balancing? And if so what are the recommended configurations?
Any advice, real-world experience here would be appreciated.

PHP中文网
PHP中文网

认证0级讲师

全員に返信(0)
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!