关于docker|关于docker compose安装redis集群的问题(集群扩容、集群收缩)

目录

  • 一、redis 配置信息模板
  • 二、编写批量生成配置文件脚本
  • 三、批量生成配置文件
  • 四、编写 docker-compose 文件
  • 五、做集群、分配插槽
  • 六、测试:
  • 七、手动扩容
  • 八、添加主从节点
    • 1、添加主节点
    • 2、添加从节点
  • 九、分配插槽
    • 十、集群测试
      • 十一、常用命令

        一、redis 配置信息模板 文件名:redis-cluster.tmpl
        # redis端口port ${PORT}#redis 访问密码requirepass 123456#redis 访问Master节点密码masterauth 123456# 关闭保护模式protected-mode no# 开启集群cluster-enabled yes# 集群节点配置cluster-config-file nodes.conf# 超时cluster-node-timeout 5000# 集群节点IP host模式为宿主机IP# cluster-announce-ip 192.168.1.10# 集群节点端口 7001 - 7006cluster-announce-port ${PORT}cluster-announce-bus-port 1${PORT}# 开启 appendonly 备份模式appendonly yes# 每秒钟备份appendfsync everysec# 对aof文件进行压缩时,是否执行同步操作no-appendfsync-on-rewrite no# 当目前aof文件大小超过上一次重写时的aof文件大小的100%时会再次进行重写auto-aof-rewrite-percentage 100# 重写前AOF文件的大小最小值 默认 64mbauto-aof-rewrite-min-size 64mb# 日志配置# debug:会打印生成大量信息,适用于开发/测试阶段# verbose:包含很多不太有用的信息,但是不像debug级别那么混乱# notice:适度冗长,适用于生产环境# warning:仅记录非常重要、关键的警告消息loglevel notice# 日志文件路径logfile "/data/redis.log"


        二、编写批量生成配置文件脚本 文件名:redis-cluster-config.sh
        for port in `seq 7001 7006`; do \mkdir -p ./${port}/conf \&& PORT=${port} envsubst < ./redis-cluster.tmpl > ./${port}/conf/redis.conf \&& mkdir -p ./${port}/data; \done


        三、批量生成配置文件 执行 redis-cluster-config.sh 生成配置文件
        关于docker|关于docker compose安装redis集群的问题(集群扩容、集群收缩)
        文章图片


        四、编写 docker-compose 文件 文件名:docker-compose.yml
        version: '3'services:redis-7001:image: redis:6container_name: redis-7001command:["redis-server", "/usr/local/etc/redis/redis.conf"]volumes:- ./7001/conf/redis.conf:/usr/local/etc/redis/redis.conf- ./7001/data:/dataports:- "7001:7001"- "17001:17001"environment:# 设置时区为上海,否则时间会有问题- TZ=Asia/Shanghailogging:options:max-size: '100m'max-file: '10'redis-7002:container_name: redis-7002- ./7002/conf/redis.conf:/usr/local/etc/redis/redis.conf- ./7002/data:/data- "7002:7002"- "17002:17002"redis-7003:container_name: redis-7003- ./7003/conf/redis.conf:/usr/local/etc/redis/redis.conf- ./7003/data:/data- "7003:7003"- "17003:17003"redis-7004:container_name: redis-7004- ./7004/conf/redis.conf:/usr/local/etc/redis/redis.conf- ./7004/data:/data- "7004:7004"- "17004:17004"redis-7005:container_name: redis-7005- ./7005/conf/redis.conf:/usr/local/etc/redis/redis.conf- ./7005/data:/data- "7005:7005"- "17005:17005"redis-7006:container_name: redis-7006- ./7006/conf/redis.conf:/usr/local/etc/redis/redis.conf- ./7006/data:/data- "7006:7006"- "17006:17006"


        五、做集群、分配插槽 注:192.168.44.65 为 宿主机ip
        ip port
        192.168.44.65 7001
        192.168.44.65 7002
        192.168.44.65 7003
        192.168.44.65 7004
        192.168.44.65 7005
        192.168.44.65 7006
        执行命令:
        注: cluster-replicas 表示 一个主节点有几个从节点
        C:\Users\billow>docker exec -it redis-7001 redis-cli -p 7001 -a 123456 --cluster create 192.168.44.65:7001 192.168.44.65:7002 192.168.44.65:7003 192.168.44.65:7004 192.168.44.65:7005 192.168.44.65:7006 --cluster-replicas 1>>> Performing hash slots allocation on 6 nodes...Master[0] -> Slots 0 - 5460Master[1] -> Slots 5461 - 10922Master[2] -> Slots 10923 - 16383Adding replica 192.168.44.65:7005 to 192.168.44.65:7001Adding replica 192.168.44.65:7006 to 192.168.44.65:7002Adding replica 192.168.44.65:7004 to 192.168.44.65:7003>>> Trying to optimize slaves allocation for anti-affinity[WARNING] Some slaves are in the same host as their masterM: 741c7bb537888ff97866896abb22da27c22f8eaf 192.168.44.65:7001slots:[0-5460] (5461 slots) masterM: e5f687462a0c47f51c3abf4b8d77d646a3d63fa9 192.168.44.65:7002slots:[5461-10922] (5462 slots) masterM: 9936d3690d971eccfc8b8ed43c5defc66f318454 192.168.44.65:7003slots:[10923-16383] (5461 slots) masterS: b7b6fa6a4766c32c5d42d759548d6fcdf2b9159b 192.168.44.65:7004replicates e5f687462a0c47f51c3abf4b8d77d646a3d63fa9S: 2275c996f25a8815342e2435af073eb29565778b 192.168.44.65:7005replicates 9936d3690d971eccfc8b8ed43c5defc66f318454S: f69a5d0ae974816396a9d9e613c13f6ceea25de2 192.168.44.65:7006replicates 741c7bb537888ff97866896abb22da27c22f8eafCan I set the above configuration? (type 'yes' to accept): yes>>> Nodes configuration updated>>> Assign a different config epoch to each node>>> Sending CLUSTER MEET messages to join the clusterWaiting for the cluster to join.>>> Performing Cluster Check (using node 192.168.44.65:7001)M: 741c7bb537888ff97866896abb22da27c22f8eaf 192.168.44.65:7001slots:[0-5460] (5461 slots) master1 additional replica(s)S: f69a5d0ae974816396a9d9e613c13f6ceea25de2 172.25.0.11:7006slots: (0 slots) slavereplicates 741c7bb537888ff97866896abb22da27c22f8eafM: 9936d3690d971eccfc8b8ed43c5defc66f318454 172.25.0.7:7003slots:[10923-16383] (5461 slots) master1 additional replica(s)M: e5f687462a0c47f51c3abf4b8d77d646a3d63fa9 172.25.0.8:7002slots:[5461-10922] (5462 slots) master1 additional replica(s)S: 2275c996f25a8815342e2435af073eb29565778b 172.25.0.10:7005slots: (0 slots) slavereplicates 9936d3690d971eccfc8b8ed43c5defc66f318454S: b7b6fa6a4766c32c5d42d759548d6fcdf2b9159b 172.25.0.9:7004slots: (0 slots) slavereplicates e5f687462a0c47f51c3abf4b8d77d646a3d63fa9[OK] All nodes agree about slots configuration.>>> Check for open slots...>>> Check slots coverage...[OK] All 16384 slots covered.


        六、测试: 命令:
        -- 集群、分配插槽docker exec -it redis-7001 redis-cli -p 7001 -a 123456 --cluster create 192.168.44.65:7001 192.168.44.65:7002 192.168.44.65:7003 192.168.44.65:7004 192.168.44.65:7005 192.168.44.65:7006 --cluster-replicas 1-- 测试docker exec -it redis-7001 redis-cli -h 192.168.44.65 -p 7003 -a 123456 -c-- 查看集群状态cluster nodes-- 查看分片信息cluster slots-- 查看集群信息cluster info

        执行结果:
        C:\Users\billow>docker exec -it redis-7001 redis-cli -h 192.168.44.65 -p 7003 -a 123456 -c
        Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
        192.168.44.65:7003>
        192.168.44.65:7003>
        192.168.44.65:7003>
        192.168.44.65:7003>
        192.168.44.65:7003> set name admin
        -> Redirected to slot [5798] located at 172.25.0.8:7002
        OK
        172.25.0.8:7002> get name
        "admin"
        172.25.0.8:7002> cluster nodes
        2275c996f25a8815342e2435af073eb29565778b 172.25.0.10:7005@17005 slave 9936d3690d971eccfc8b8ed43c5defc66f318454 0 1648086940436 3 connected
        f69a5d0ae974816396a9d9e613c13f6ceea25de2 172.25.0.11:7006@17006 slave 741c7bb537888ff97866896abb22da27c22f8eaf 0 1648086939000 1 connected
        b7b6fa6a4766c32c5d42d759548d6fcdf2b9159b 172.25.0.9:7004@17004 slave e5f687462a0c47f51c3abf4b8d77d646a3d63fa9 0 1648086939710 2 connected
        741c7bb537888ff97866896abb22da27c22f8eaf 172.25.0.6:7001@17001 master - 0 1648086939392 1 connected 0-5460
        e5f687462a0c47f51c3abf4b8d77d646a3d63fa9 172.25.0.8:7002@17002 myself,master - 0 1648086939000 2 connected 5461-10922
        9936d3690d971eccfc8b8ed43c5defc66f318454 172.25.0.7:7003@17003 master - 0 1648086938868 3 connected 10923-16383
        172.25.0.8:7002>
        172.25.0.8:7002>
        172.25.0.8:7002>
        172.25.0.8:7002>
        172.25.0.8:7002>
        172.25.0.8:7002> cluster slots
        1) 1) (integer) 0
        2) (integer) 5460
        3) 1) "172.25.0.6"
        2) (integer) 7001
        3) "741c7bb537888ff97866896abb22da27c22f8eaf"
        4) 1) "172.25.0.11"
        2) (integer) 7006
        3) "f69a5d0ae974816396a9d9e613c13f6ceea25de2"
        2) 1) (integer) 5461
        2) (integer) 10922
        3) 1) "172.25.0.8"
        2) (integer) 7002
        3) "e5f687462a0c47f51c3abf4b8d77d646a3d63fa9"
        4) 1) "172.25.0.9"
        2) (integer) 7004
        3) "b7b6fa6a4766c32c5d42d759548d6fcdf2b9159b"
        3) 1) (integer) 10923
        2) (integer) 16383
        3) 1) "172.25.0.7"
        2) (integer) 7003
        3) "9936d3690d971eccfc8b8ed43c5defc66f318454"
        4) 1) "172.25.0.10"
        2) (integer) 7005
        3) "2275c996f25a8815342e2435af073eb29565778b"
        172.25.0.8:7002> cluster info
        cluster_state:ok
        cluster_slots_assigned:16384
        cluster_slots_ok:16384
        cluster_slots_pfail:0
        cluster_slots_fail:0
        cluster_known_nodes:6
        cluster_size:3
        cluster_current_epoch:6
        cluster_my_epoch:2
        cluster_stats_messages_ping_sent:906
        cluster_stats_messages_pong_sent:911
        cluster_stats_messages_meet_sent:1
        cluster_stats_messages_sent:1818
        cluster_stats_messages_ping_received:911
        cluster_stats_messages_pong_received:906
        cluster_stats_messages_received:1817

        七、手动扩容 添加两个新的节点用于手动扩容
        文件名:add-redis-docker.yml
        version: '3'services:redis-7007:image: redis:6container_name: redis-7007command:["redis-server", "/usr/local/etc/redis/redis.conf"]volumes:- ./7007/conf/redis.conf:/usr/local/etc/redis/redis.conf- ./7007/data:/dataports:- "7007:7007"- "17007:17007"environment:# 设置时区为上海,否则时间会有问题- TZ=Asia/Shanghailogging:options:max-size: '100m'max-file: '10'redis-7008:container_name: redis-7008- ./7008/conf/redis.conf:/usr/local/etc/redis/redis.conf- ./7008/data:/data- "7008:7008"- "17008:17008"networks:default:external:name: learn_shop

        执行命令:
        docker-compose -f add-redis-docker.yml up

        八、添加主从节点
        1、添加主节点
        -- 进入任意节点docker exet -it redis-7001 bash-- 添加主节点(192.168.44.65:7001 -a 123456这个可以是任何已存在的节点,主要用于获取集群信息)redis-cli --cluster add-node 192.168.44.65:7007 192.168.44.65:7001 -a 123456

        结果:
        root@aa1e004c00ff:/data# redis-cli --cluster add-node 192.168.44.65:7007 192.168.44.65:7001 -a 123456
        Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
        >>> Adding node 192.168.44.65:7007 to cluster 192.168.44.65:7001
        >>> Performing Cluster Check (using node 192.168.44.65:7001)
        M: 741c7bb537888ff97866896abb22da27c22f8eaf 192.168.44.65:7001
        slots:[0-5460] (5461 slots) master
        1 additional replica(s)
        S: 2275c996f25a8815342e2435af073eb29565778b 172.25.0.6:7005
        slots: (0 slots) slave
        replicates 9936d3690d971eccfc8b8ed43c5defc66f318454
        M: 9936d3690d971eccfc8b8ed43c5defc66f318454 172.25.0.8:7003
        slots:[10923-16383] (5461 slots) master
        1 additional replica(s)
        S: f69a5d0ae974816396a9d9e613c13f6ceea25de2 172.25.0.11:7006
        slots: (0 slots) slave
        replicates 741c7bb537888ff97866896abb22da27c22f8eaf
        S: b7b6fa6a4766c32c5d42d759548d6fcdf2b9159b 172.25.0.9:7004
        slots: (0 slots) slave
        replicates e5f687462a0c47f51c3abf4b8d77d646a3d63fa9
        M: e5f687462a0c47f51c3abf4b8d77d646a3d63fa9 172.25.0.7:7002
        slots:[5461-10922] (5462 slots) master
        1 additional replica(s)
        [OK] All nodes agree about slots configuration.
        >>> Check for open slots...
        >>> Check slots coverage...
        [OK] All 16384 slots covered.
        >>> Send CLUSTER MEET to node 192.168.44.65:7007 to make it join the cluster.
        [OK] New node added correctly.
        查看刚加的主节点:
        127.0.0.1:7001> cluster nodes741c7bb537888ff97866896abb22da27c22f8eaf 172.25.0.10:7001@17001 myself,master - 0 1648104789000 1 connected 0-54602275c996f25a8815342e2435af073eb29565778b 172.25.0.6:7005@17005 slave 9936d3690d971eccfc8b8ed43c5defc66f318454 0 1648104789523 3 connected6f0c7d0ae166717d645e84b48b72b9706c7c758a 172.25.0.13:7007@17007 master - 0 1648104790133 0 connected9936d3690d971eccfc8b8ed43c5defc66f318454 172.25.0.8:7003@17003 master - 0 1648104790546 3 connected 10923-16383f69a5d0ae974816396a9d9e613c13f6ceea25de2 172.25.0.11:7006@17006 slave 741c7bb537888ff97866896abb22da27c22f8eaf 0 1648104790000 1 connectedb7b6fa6a4766c32c5d42d759548d6fcdf2b9159b 172.25.0.9:7004@17004 slave e5f687462a0c47f51c3abf4b8d77d646a3d63fa9 0 1648104790000 2 connectede5f687462a0c47f51c3abf4b8d77d646a3d63fa9 172.25.0.7:7002@17002 master - 0 1648104791062 2 connected 5461-10922


        2、添加从节点
        -- 进入任意节点docker exet -it redis-7001 bash-- 添加从节点(192.168.44.65:7001 -a 123456这个可以是任何已存在的节点,主要用于获取集群信息)(6f0c7d0ae166717d645e84b48b72b9706c7c758a为刚加的主节点 id)redis-cli --cluster add-node --cluster-slave --cluster-master-id 6f0c7d0ae166717d645e84b48b72b9706c7c758a 192.168.44.65:7008 192.168.44.65:7001 -a 123456

        结果:
        127.0.0.1:7001> cluster nodes
        741c7bb537888ff97866896abb22da27c22f8eaf 172.25.0.10:7001@17001 myself,master - 0 1648105151000 1 connected 0-5460
        2275c996f25a8815342e2435af073eb29565778b 172.25.0.6:7005@17005 slave 9936d3690d971eccfc8b8ed43c5defc66f318454 0 1648105154016 3 connected
        6f0c7d0ae166717d645e84b48b72b9706c7c758a 172.25.0.13:7007@17007 master - 0 1648105152000 0 connected
        9936d3690d971eccfc8b8ed43c5defc66f318454 172.25.0.8:7003@17003 master - 0 1648105153000 3 connected 10923-16383
        f69a5d0ae974816396a9d9e613c13f6ceea25de2 172.25.0.11:7006@17006 slave 741c7bb537888ff97866896abb22da27c22f8eaf 0 1648105152000 1 connected
        6478c692a149130d56538aea69b54d2abc1c98b4 172.25.0.12:7008@17008 slave 6f0c7d0ae166717d645e84b48b72b9706c7c758a 0 1648105152000 0 connected
        b7b6fa6a4766c32c5d42d759548d6fcdf2b9159b 172.25.0.9:7004@17004 slave e5f687462a0c47f51c3abf4b8d77d646a3d63fa9 0 1648105153599 2 connected
        e5f687462a0c47f51c3abf4b8d77d646a3d63fa9 172.25.0.7:7002@17002 master - 0 1648105153000 2 connected 5461-10922

        九、分配插槽 刚加入的主从节点还不能使用,因为还没有分配插槽
        rebalance平衡集群节点slot数量
        语法:
        rebalance host:port--weight --auto-weights--threshold --use-empty-masters--timeout --simulate--pipeline host:port:这个是必传参数,用来从一个节点获取整个集群信息,相当于获取集群信息的入口。--weight :节点的权重,格式为node_id=weight,如果需要为多个节点分配权重的话,需要添加多个--weight 参数,即--weight b31e3a2e=5 --weight 60b8e3a1=5,node_id可为节点名称的前缀,只要保证前缀位数能唯一区分该节点即可。没有传递–weight的节点的权重默认为1。--auto-weights:这个参数在rebalance流程中并未用到。--threshold :只有节点需要迁移的slot阈值超过threshold,才会执行rebalance操作。具体计算方法可以参考下面的rebalance命令流程的第四步。--use-empty-masters:rebalance是否考虑没有节点的master,默认没有分配slot节点的master是不参与rebalance的,设置--use-empty-masters可以让没有分配slot的节点参与rebalance。--timeout :设置migrate命令的超时时间。--simulate:设置该参数,可以模拟rebalance操作,提示用户会迁移哪些slots,而不会真正执行迁移操作。--pipeline :与reshar的pipeline参数一样,定义cluster getkeysinslot命令一次取出的key数量,不传的话使用默认值为10。

        -- 分配插槽(192.168.44.65:7001 -a 123456这个可以是任何已存在的节点,主要用于获取集群信息)redis-cli --cluster rebalance --cluster-threshold 1 --cluster-use-empty-masters 192.168.44.65:7001 -a 123456

        如果需要模拟执行添加 : --cluster-simulate
        结果:
        root@aa1e004c00ff:/data# redis-cli --cluster rebalance --cluster-threshold 1 --cluster-use-empty-masters 192.168.44.65:7001 -a 123456
        Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
        >>> Performing Cluster Check (using node 192.168.44.65:7001)
        [OK] All nodes agree about slots configuration.
        >>> Check for open slots...
        >>> Check slots coverage...
        [OK] All 16384 slots covered.
        >>> Rebalancing across 4 nodes. Total weight = 4.00
        Moving 1366 slots from 172.25.0.7:7002 to 172.25.0.13:7007
        #########################################################################################
        Moving 1365 slots from 172.25.0.8:7003 to 172.25.0.13:7007
        #########################################################################################
        Moving 1365 slots from 192.168.44.65:7001 to 172.25.0.13:7007
        #########################################################################################
        查看节点信息:
        127.0.0.1:7001> cluster nodes
        741c7bb537888ff97866896abb22da27c22f8eaf 172.25.0.10:7001@17001 myself,master - 0 1648105892000 1 connected 1365-5460
        2275c996f25a8815342e2435af073eb29565778b 172.25.0.6:7005@17005 slave 9936d3690d971eccfc8b8ed43c5defc66f318454 0 1648105893536 3 connected
        6f0c7d0ae166717d645e84b48b72b9706c7c758a 172.25.0.13:7007@17007 master - 0 1648105894566 8 connected 0-1364 5461-6826 10923-12287
        9936d3690d971eccfc8b8ed43c5defc66f318454 172.25.0.8:7003@17003 master - 0 1648105893000 3 connected 12288-16383
        f69a5d0ae974816396a9d9e613c13f6ceea25de2 172.25.0.11:7006@17006 slave 741c7bb537888ff97866896abb22da27c22f8eaf 0 1648105893000 1 connected
        6478c692a149130d56538aea69b54d2abc1c98b4 172.25.0.12:7008@17008 slave 6f0c7d0ae166717d645e84b48b72b9706c7c758a 0 1648105894576 8 connected
        b7b6fa6a4766c32c5d42d759548d6fcdf2b9159b 172.25.0.9:7004@17004 slave e5f687462a0c47f51c3abf4b8d77d646a3d63fa9 0 1648105893000 2 connected
        e5f687462a0c47f51c3abf4b8d77d646a3d63fa9 172.25.0.7:7002@17002 master - 0 1648105894566 2 connected 6827-10922

        十、集群测试
        root@aa1e004c00ff:/data# redis-cli -p 7001 -a 123456 -cWarning: Using a password with '-a' or '-u' option on the command line interface may not be safe.127.0.0.1:7001> set 1 1-> Redirected to slot [9842] located at 172.25.0.7:7002OK172.25.0.7:7002> set 2 2-> Redirected to slot [5649] located at 172.25.0.13:7007OK172.25.0.13:7007> set 3 3-> Redirected to slot [1584] located at 172.25.0.10:7001OK172.25.0.10:7001> set 4 4-> Redirected to slot [14039] located at 172.25.0.8:7003OK172.25.0.8:7003> set 5 5-> Redirected to slot [9974] located at 172.25.0.7:7002OK172.25.0.7:7002> set 6 6-> Redirected to slot [5781] located at 172.25.0.13:7007OK172.25.0.13:7007> set 7 7-> Redirected to slot [1716] located at 172.25.0.10:7001OK172.25.0.10:7001>172.25.0.10:7001>172.25.0.10:7001>172.25.0.10:7001>172.25.0.10:7001> get 1-> Redirected to slot [9842] located at 172.25.0.7:7002"1"172.25.0.7:7002> get 2-> Redirected to slot [5649] located at 172.25.0.13:7007"2"172.25.0.13:7007> get 3-> Redirected to slot [1584] located at 172.25.0.10:7001"3"172.25.0.10:7001> get 4-> Redirected to slot [14039] located at 172.25.0.8:7003"4"172.25.0.8:7003> get 5-> Redirected to slot [9974] located at 172.25.0.7:7002"5"172.25.0.7:7002> get 6-> Redirected to slot [5781] located at 172.25.0.13:7007"6"172.25.0.13:7007> get 7-> Redirected to slot [1716] located at 172.25.0.10:7001"7"


        十一、常用命令
        集群cluster info :打印集群的信息cluster nodes :列出集群当前已知的所有节点( node),以及这些节点的相关信息。节点cluster meet :将 ip 和 port 所指定的节点添加到集群当中,让它成为集群的一份子。cluster forget :从集群中移除 node_id 指定的节点。cluster replicate :将当前节点设置为 node_id 指定的节点的从节点。cluster saveconfig :将节点的配置文件保存到硬盘里面。槽(slot)cluster addslots[slot ...] :将一个或多个槽( slot)指派( assign)给当前节点。cluster delslots[slot ...] :移除一个或多个槽对当前节点的指派。cluster flushslots :移除指派给当前节点的所有槽,让当前节点变成一个没有指派任何槽的节点。cluster setslotnode :将槽 slot 指派给 node_id 指定的节点,如果槽已经指派给另一个节点,那么先让另一个节点删除该槽>,然后再进行指派。cluster setslotmigrating :将本节点的槽 slot 迁移到 node_id 指定的节点中。cluster setslotimporting :从 node_id 指定的节点中导入槽 slot 到本节点。cluster setslotstable :取消对槽 slot 的导入( import)或者迁移( migrate)。键cluster keyslot :计算键 key 应该被放置在哪个槽上。cluster countkeysinslot:返回槽 slot 目前包含的键值对数量。cluster getkeysinslot :返回 count 个 slot 槽中的键

        【关于docker|关于docker compose安装redis集群的问题(集群扩容、集群收缩)】到此这篇关于docker compose安装redis集群、集群扩容、集群收缩的文章就介绍到这了,更多相关docker compose安装redis集群内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!

          推荐阅读