search

Home  >  Q&A  >  body text

redis集群设计

有两台服务器A,B做redis集群。 数据的写入是平均分配到二台服务器上,还是先写完一台服务器在向另一台服务器写数据呢。

二种情况各有什么优势,

怪我咯怪我咯2777 days ago719

reply all(2)I'll reply

  • 淡淡烟草味

    淡淡烟草味2017-04-27 09:05:44

    You can try the redis cluster that comes with Redis 3.0 or above. Redis cluster uses data sharding instead of consistency hashing to implement: a Redis cluster contains 16384 hash slots, database Each key in belongs to one of the 16384 hash slots. The cluster uses the formula CRC16(key) % 16384 to calculate which slot the key belongs to. The CRC16(key) statement is used to calculate the CRC16 checksum of the key key. . Hope the above answer is helpful to you

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-04-27 09:05:44

    Official cluster deployment document: http://redis.cn/topics/cluste...

    reply
    0
  • Cancelreply