zoukankan      html  css  js  c++  java
  • Redit集群搭建-Sentinel模式搭建

    Redit集群搭建

    学习了:

    Windows:http://blog.csdn.net/mrxiagc/article/details/52799081

    Linux:https://www.cnblogs.com/yuanermen/p/5717885.html

    Redis集群采用哈希槽(hash slot)进行数据的分配,Redis Cluster默认分配了16384个hash slot,

    当我们set一个key时,会使用CRC16算法来取模得到所属的slot,然后将这个key分配到对应的

    哈希槽对应的节点上,具体算法就是CRC16(key)%16384。

    ============================

    https://www.jianshu.com/p/42ee966f96e5

    运行之后,配置的参数会被redis修改

    哨兵模式配置

    # master
    port 6379
    bind 0.0.0.0
    masterauth 123456
    requirepass 123456
    slave-read-only yes
    
    # slave1
    port 6380
    bind 0.0.0.0
    masterauth 123456
    requirepass 123456
    slave-read-only yes
    
    # slave2
    port 6381
    bind 0.0.0.0
    masterauth 123456
    requirepass 123456
    slave-read-only yes
    
    # sentinel1
    port 26379
    sentinel monitor redis-master 192.168.1.51 7000 2
    sentinel down-after-milliseconds redis-master 5000
    sentinel failover-timeout redis-master 900000
    sentinel parallel-syncs redis-master 2
    sentinel auth-pass redis-master 123456
    
    # sentinel2
    port 26380
    sentinel monitor redis-master 192.168.1.51 7000 2
    sentinel down-after-milliseconds redis-master 5000
    sentinel failover-timeout redis-master 900000
    sentinel parallel-syncs redis-master 2
    sentinel auth-pass redis-master 123456
    
    # sentinel3
    port 26381
    sentinel monitor redis-master 192.168.1.51 7000 2
    sentinel down-after-milliseconds redis-master 5000
    sentinel failover-timeout redis-master 900000
    sentinel parallel-syncs redis-master 2
    sentinel auth-pass redis-master 123456
  • 相关阅读:
    PHP的垃圾回收机制
    python使用httpHandler处理请求案例
    使用python中urllib.request.Request()来构建ua
    Pillow《转载》
    python数据格式化之pprint
    使用Mechanize实现自动化表单处理
    beautifulSoup《转》
    Python3网络爬虫(四):使用User Agent和代理IP隐藏身份《转》
    python urllib和urllib3包使用
    使用Mechanize实现自动化表单处理
  • 原文地址:https://www.cnblogs.com/stono/p/8099072.html
Copyright © 2011-2022 走看看