Home  >  Q&A  >  body text

jedis - Redis通过Sentinel可以实现主从切换,客户端怎么实现自动切换?

假设A是主,B是从,在一次failover后,A变成从,B变成主
怎么实现客户端自动从连接B变成连接A?用的是Jedis

为情所困为情所困2704 days ago737

reply all(1)I'll reply

  • PHPz

    PHPz2017-04-25 09:05:35

    Use JedisSentinelPool class

    reply
    0
  • Cancelreply