日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

redis cluster 集群 安装 配置 详解

發布時間:2025/5/22 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 redis cluster 集群 安装 配置 详解 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

redis cluster 集群 安裝 配置 詳解

張映 發表于 2015-05-01

分類目錄: nosql

標簽:cluster, redis, 安裝, 配置, 集群

Redis 集群是一個提供在多個Redis間節點間共享數據的程序集.redis3.0以前,只支持主從同步的,如果主的掛了,寫入就成問題了。3.0出來后就可以很好幫我們解決這個問題。

目前redis 3.0還不穩定,如果要用在生產環境中,要慎重。

?

一,redis服務器說明

  • 192.168.10.219 6379?
  • 192.168.10.219 6380?
  • 192.168.10.219 6381?
  • ?
  • 192.168.10.220 6382?
  • 192.168.10.220 6383?
  • 192.168.10.220 6384?
  • 192.168.10.219 6379 192.168.10.219 6380 192.168.10.219 6381192.168.10.220 6382 192.168.10.220 6383 192.168.10.220 6384

    要讓集群正常運作至少需要三個主節點,不過在剛開始試用集群功能時, 強烈建議使用六個節點: 其中三個為主節點, 而其余三個則是各個主節點的從節點。所有用二臺機器,開6個redis進程,模擬6臺機器。

    二,安裝ruby,rubygems

    查看復制打印?
  • # yum -y install gcc openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel gcc-c++ automake autoconf?
  • ?
  • # yum -y install ruby rubygems?? //安裝ruby rubygems?
  • ?
  • //換源?
  • # gem source -l?
  • # gem source --remove http://rubygems.org/?
  • # gem sources -a http://ruby.taobao.org/?
  • # gem source -l?
  • ?
  • # gem install redis --version 3.0.0? //安裝gem_redis?
  • Successfully installed redis-3.0.0?
  • 1 gem installed?
  • Installing ri documentation for redis-3.0.0...?
  • Installing RDoc documentation for redis-3.0.0...?
  • # yum -y install gcc openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel gcc-c++ automake autoconf# yum -y install ruby rubygems //安裝ruby rubygems//換源 # gem source -l # gem source --remove http://rubygems.org/ # gem sources -a http://ruby.taobao.org/ # gem source -l# gem install redis --version 3.0.0 //安裝gem_redis Successfully installed redis-3.0.0 1 gem installed Installing ri documentation for redis-3.0.0... Installing RDoc documentation for redis-3.0.0...

    以前寫過一篇ruby on rails的文章,請參考:centos ruby on rails apache mysql 安裝配置詳解

    喜歡手動編譯的人,可以參考這篇文章,安裝ruby.

    三,安裝redis3.0.0

    ?

    1,安裝redis

    查看復制打印?
  • # wget http://download.redis.io/releases/redis-3.0.0.tar.gz?
  • # tar -xvzf redis-3.0.0.tar.gz?
  • # cd redis-3.0.0?
  • # make && make install?
  • # cd src?
  • # cp redis-trib.rb /usr/local/bin???
  • ?
  • # mkdir /etc/redis?
  • # mkdir /var/log/redis?
  • # wget http://download.redis.io/releases/redis-3.0.0.tar.gz # tar -xvzf redis-3.0.0.tar.gz # cd redis-3.0.0 # make && make install # cd src # cp redis-trib.rb /usr/local/bin # mkdir /etc/redis # mkdir /var/log/redis

    上述操作要先在二臺機器上面都操作好。

    2,配置redis

    查看復制打印?
  • [root@slave2 redis-3.0.0]#? vim redis.conf?? //解壓的根目錄,有redis.conf,做以下修改?
  • port 6379?
  • pidfile /var/run/redis-6379.pid?
  • dbfilename dump-6379.rdb?
  • appendfilename "appendonly-6379.aof"?
  • cluster-config-file nodes-6379.conf?
  • cluster-enabled yes?
  • cluster-node-timeout 5000?
  • appendonly yes?
  • [root@slave2 redis-3.0.0]# vim redis.conf //解壓的根目錄,有redis.conf,做以下修改 port 6379 pidfile /var/run/redis-6379.pid dbfilename dump-6379.rdb appendfilename "appendonly-6379.aof" cluster-config-file nodes-6379.conf cluster-enabled yes cluster-node-timeout 5000 appendonly yes

    3,copy配置文件,并修改端口

    查看復制打印?
  • # cp redis.conf /etc/redis/redis-6379.conf?
  • # cp redis.conf /etc/redis/redis-6380.conf?
  • # cp redis.conf /etc/redis/redis-6381.conf?
  • ?
  • # scp redis.conf 192.168.10.220:/etc/redis/redis-6382.conf?
  • # scp redis.conf 192.168.10.220:/etc/redis/redis-6383.conf?
  • # scp redis.conf 192.168.10.220:/etc/redis/redis-6384.conf?
  • ?
  • # sed -i "s/6379/6380/g" /etc/redis/redis-6380.conf?
  • # sed -i "s/6379/6381/g" /etc/redis/redis-6381.conf?
  • ?
  • # sed -i "s/6379/6382/g" /etc/redis/redis-6382.conf?
  • # sed -i "s/6379/6383/g" /etc/redis/redis-6383.conf?
  • # sed -i "s/6379/6384/g" /etc/redis/redis-6384.conf?
  • # cp redis.conf /etc/redis/redis-6379.conf # cp redis.conf /etc/redis/redis-6380.conf # cp redis.conf /etc/redis/redis-6381.conf# scp redis.conf 192.168.10.220:/etc/redis/redis-6382.conf # scp redis.conf 192.168.10.220:/etc/redis/redis-6383.conf # scp redis.conf 192.168.10.220:/etc/redis/redis-6384.conf# sed -i "s/6379/6380/g" /etc/redis/redis-6380.conf # sed -i "s/6379/6381/g" /etc/redis/redis-6381.conf# sed -i "s/6379/6382/g" /etc/redis/redis-6382.conf # sed -i "s/6379/6383/g" /etc/redis/redis-6383.conf # sed -i "s/6379/6384/g" /etc/redis/redis-6384.conf

    將配置文件分別copy到二臺機器上,并替換端口:

    查看復制打印?
  • # cat redis-6380.conf |awk '{if($0 !~ /^$/ && $0 !~ /#/) {print $0}}' |grep 6380?
  • pidfile /var/run/redis-6380.pid?
  • port 6380?
  • dbfilename dump-6380.rdb?
  • appendfilename "appendonly-6380.aof"?
  • cluster-config-file nodes-6380.conf?
  • # cat redis-6380.conf |awk '{if($0 !~ /^$/ && $0 !~ /#/) {print $0}}' |grep 6380 pidfile /var/run/redis-6380.pid port 6380 dbfilename dump-6380.rdb appendfilename "appendonly-6380.aof" cluster-config-file nodes-6380.conf

    有5處修改端口的地方

    4,啟動并查看redis

    查看復制打印?
  • # redis-server /etc/redis/redis-6379.conf > /var/log/redis/redis-6379.log 2>&1 &?
  • # redis-server /etc/redis/redis-6380.conf > /var/log/redis/redis-6380.log 2>&1 &?
  • # redis-server /etc/redis/redis-6381.conf > /var/log/redis/redis-6381.log 2>&1 &?
  • ?
  • # redis-server /etc/redis/redis-6382.conf > /var/log/redis/redis-6382.log 2>&1 &?
  • # redis-server /etc/redis/redis-6383.conf > /var/log/redis/redis-6383.log 2>&1 &?
  • # redis-server /etc/redis/redis-6384.conf > /var/log/redis/redis-6384.log 2>&1 &?
  • ?
  • # netstat -tpnl |grep redis?
  • tcp??????? 0????? 0 0.0.0.0:6379??????????????? 0.0.0.0:*?????????????????? LISTEN????? 7298/redis-server *?
  • tcp??????? 0????? 0 0.0.0.0:6380??????????????? 0.0.0.0:*?????????????????? LISTEN????? 7299/redis-server *?
  • tcp??????? 0????? 0 0.0.0.0:6381??????????????? 0.0.0.0:*?????????????????? LISTEN????? 7304/redis-server *?
  • tcp??????? 0????? 0 0.0.0.0:16379?????????????? 0.0.0.0:*?????????????????? LISTEN????? 7298/redis-server *?
  • tcp??????? 0????? 0 0.0.0.0:16380?????????????? 0.0.0.0:*?????????????????? LISTEN????? 7299/redis-server *?
  • tcp??????? 0????? 0 0.0.0.0:16381?????????????? 0.0.0.0:*?????????????????? LISTEN????? 7304/redis-server *?
  • tcp??????? 0????? 0 :::6379???????????????????? :::*??????????????????????? LISTEN????? 7298/redis-server *?
  • tcp??????? 0????? 0 :::6380???????????????????? :::*??????????????????????? LISTEN????? 7299/redis-server *?
  • tcp??????? 0????? 0 :::6381???????????????????? :::*??????????????????????? LISTEN????? 7304/redis-server *?
  • tcp??????? 0????? 0 :::16379??????????????????? :::*??????????????????????? LISTEN????? 7298/redis-server *?
  • tcp??????? 0????? 0 :::16380??????????????????? :::*??????????????????????? LISTEN????? 7299/redis-server *?
  • tcp??????? 0????? 0 :::16381??????????????????? :::*??????????????????????? LISTEN????? 7304/redis-server *?
  • ?
  • [root@slave2 redis]# ll /etc/redis/?
  • 總用量 156?
  • -rw-r--r-- 1 root root???? 0 4月? 30 23:54 appendonly-6379.aof?
  • -rw-r--r-- 1 root root???? 0 5月?? 1 00:08 appendonly-6380.aof?
  • -rw-r--r-- 1 root root???? 0 5月?? 1 00:08 appendonly-6381.aof?
  • -rw-r--r-- 1 root root??? 18 5月?? 1 00:08 dump-6379.rdb?
  • -rw-r--r-- 1 root root??? 18 5月?? 1 00:08 dump-6380.rdb?
  • -rw-r--r-- 1 root root??? 18 5月?? 1 00:08 dump-6381.rdb?
  • -rw-r--r-- 1 root root?? 763 5月?? 1 00:08 nodes-6379.conf?
  • -rw-r--r-- 1 root root?? 763 5月?? 1 00:08 nodes-6380.conf?
  • -rw-r--r-- 1 root root?? 763 5月?? 1 00:08 nodes-6381.conf?
  • -rw-r--r-- 1 root root 41412 4月? 30 23:30 redis-6379.conf?
  • -rw-r--r-- 1 root root 41412 4月? 30 23:39 redis-6380.conf?
  • -rw-r--r-- 1 root root 41412 4月? 30 23:39 redis-6381.conf?
  • # redis-server /etc/redis/redis-6379.conf > /var/log/redis/redis-6379.log 2>&1 & # redis-server /etc/redis/redis-6380.conf > /var/log/redis/redis-6380.log 2>&1 & # redis-server /etc/redis/redis-6381.conf > /var/log/redis/redis-6381.log 2>&1 &# redis-server /etc/redis/redis-6382.conf > /var/log/redis/redis-6382.log 2>&1 & # redis-server /etc/redis/redis-6383.conf > /var/log/redis/redis-6383.log 2>&1 & # redis-server /etc/redis/redis-6384.conf > /var/log/redis/redis-6384.log 2>&1 &# netstat -tpnl |grep redis tcp 0 0 0.0.0.0:6379 0.0.0.0:* LISTEN 7298/redis-server * tcp 0 0 0.0.0.0:6380 0.0.0.0:* LISTEN 7299/redis-server * tcp 0 0 0.0.0.0:6381 0.0.0.0:* LISTEN 7304/redis-server * tcp 0 0 0.0.0.0:16379 0.0.0.0:* LISTEN 7298/redis-server * tcp 0 0 0.0.0.0:16380 0.0.0.0:* LISTEN 7299/redis-server * tcp 0 0 0.0.0.0:16381 0.0.0.0:* LISTEN 7304/redis-server * tcp 0 0 :::6379 :::* LISTEN 7298/redis-server * tcp 0 0 :::6380 :::* LISTEN 7299/redis-server * tcp 0 0 :::6381 :::* LISTEN 7304/redis-server * tcp 0 0 :::16379 :::* LISTEN 7298/redis-server * tcp 0 0 :::16380 :::* LISTEN 7299/redis-server * tcp 0 0 :::16381 :::* LISTEN 7304/redis-server *[root@slave2 redis]# ll /etc/redis/ 總用量 156 -rw-r--r-- 1 root root 0 4月 30 23:54 appendonly-6379.aof -rw-r--r-- 1 root root 0 5月 1 00:08 appendonly-6380.aof -rw-r--r-- 1 root root 0 5月 1 00:08 appendonly-6381.aof -rw-r--r-- 1 root root 18 5月 1 00:08 dump-6379.rdb -rw-r--r-- 1 root root 18 5月 1 00:08 dump-6380.rdb -rw-r--r-- 1 root root 18 5月 1 00:08 dump-6381.rdb -rw-r--r-- 1 root root 763 5月 1 00:08 nodes-6379.conf -rw-r--r-- 1 root root 763 5月 1 00:08 nodes-6380.conf -rw-r--r-- 1 root root 763 5月 1 00:08 nodes-6381.conf -rw-r--r-- 1 root root 41412 4月 30 23:30 redis-6379.conf -rw-r--r-- 1 root root 41412 4月 30 23:39 redis-6380.conf -rw-r--r-- 1 root root 41412 4月 30 23:39 redis-6381.conf

    所有節點都啟動成功,并不代表,他們就是集群了。

    四,創建集群,并查看

    ?

    1,創建redis集群

  • # redis-trib.rb create --replicas 1 192.168.10.219:6379 192.168.10.219:6380 192.168.10.219:6381 192.168.10.220:6382 192.168.10.220:6383 192.168.10.220:6384?
  • # redis-trib.rb create --replicas 1 192.168.10.219:6379 192.168.10.219:6380 192.168.10.219:6381 192.168.10.220:6382 192.168.10.220:6383 192.168.10.220:6384

    2,查看redis集群狀態

    查看復制打印?
  • [root@slave2 redis]# redis-trib.rb check 192.168.10.219:6379?
  • Connecting to node 192.168.10.219:6379: OK?
  • Connecting to node 192.168.10.220:6384: OK?
  • Connecting to node 192.168.10.219:6381: OK?
  • Connecting to node 192.168.10.220:6383: OK?
  • Connecting to node 192.168.10.220:6382: OK?
  • Connecting to node 192.168.10.219:6380: OK?
  • >>> Performing Cluster Check (using node 192.168.10.219:6379)?
  • M: d40d9a367c24784b0336c7b80fb4c87337e2cba6 192.168.10.219:6379?
  • slots:5461-10922 (5462 slots) master?
  • 1 additional replica(s)?
  • S: 5f00f163d0c0a540ea99daf004f55588a802327b 192.168.10.220:6384?
  • slots: (0 slots) slave?
  • replicates d40d9a367c24784b0336c7b80fb4c87337e2cba6?
  • S: b3b1a848987b5a87a06888e126d5c9b16f871ff5 192.168.10.219:6381?
  • slots: (0 slots) slave?
  • replicates d2eb5a8a77f87888792428aed4692dfb907e7a1d?
  • M: d2eb5a8a77f87888792428aed4692dfb907e7a1d 192.168.10.220:6383?
  • slots:10923-16383 (5461 slots) master?
  • 1 additional replica(s)?
  • M: a8eafe8b19d6a28c034917da13a43ce1230fe870 192.168.10.220:6382?
  • slots:0-5460 (5461 slots) master?
  • 1 additional replica(s)?
  • S: a87d207204a53ab599bf7f6ffb9d679d0eef4f25 192.168.10.219:6380?
  • slots: (0 slots) slave?
  • replicates a8eafe8b19d6a28c034917da13a43ce1230fe870?
  • [OK] All nodes agree about slots configuration.?
  • >>> Check for open slots...?
  • >>> Check slots coverage...?
  • [OK] All 16384 slots covered.?
  • [root@slave2 redis]# redis-trib.rb check 192.168.10.219:6379 Connecting to node 192.168.10.219:6379: OK Connecting to node 192.168.10.220:6384: OK Connecting to node 192.168.10.219:6381: OK Connecting to node 192.168.10.220:6383: OK Connecting to node 192.168.10.220:6382: OK Connecting to node 192.168.10.219:6380: OK >>> Performing Cluster Check (using node 192.168.10.219:6379) M: d40d9a367c24784b0336c7b80fb4c87337e2cba6 192.168.10.219:6379slots:5461-10922 (5462 slots) master1 additional replica(s) S: 5f00f163d0c0a540ea99daf004f55588a802327b 192.168.10.220:6384slots: (0 slots) slavereplicates d40d9a367c24784b0336c7b80fb4c87337e2cba6 S: b3b1a848987b5a87a06888e126d5c9b16f871ff5 192.168.10.219:6381slots: (0 slots) slavereplicates d2eb5a8a77f87888792428aed4692dfb907e7a1d M: d2eb5a8a77f87888792428aed4692dfb907e7a1d 192.168.10.220:6383slots:10923-16383 (5461 slots) master1 additional replica(s) M: a8eafe8b19d6a28c034917da13a43ce1230fe870 192.168.10.220:6382slots:0-5460 (5461 slots) master1 additional replica(s) S: a87d207204a53ab599bf7f6ffb9d679d0eef4f25 192.168.10.219:6380slots: (0 slots) slavereplicates a8eafe8b19d6a28c034917da13a43ce1230fe870 [OK] All nodes agree about slots configuration. >>> Check for open slots... >>> Check slots coverage... [OK] All 16384 slots covered.

    到這兒,redis集群就配置成功了

    五,測試redis集群

    查看復制打印?
  • # redis-cli -c -p 6379 -h 192.168.10.219?? //在219登錄?
  • 192.168.10.219:6379> set tank tank1??? //設置測試值?
  • -> Redirected to slot [4407] located at 192.168.10.220:6382?
  • OK?? //直接轉向到220 6382端口,數據存到了220 6382,不過有點奇怪?
  • 192.168.10.220:6382> get tank?? //可以取到值?
  • "tank1"?
  • ?
  • [root@manage redis]# redis-cli -c -p 6383 -h 192.168.10.220? //220機器,6383端口?
  • 192.168.10.220:6383> get tank?
  • -> Redirected to slot [4407] located at 192.168.10.220:6382? //直接轉向220 6382端口?
  • "tank1"?
  • ?
  • [root@manage redis]# ps aux |grep redis //查看進程?
  • root????? 7310? 0.2? 0.9 137436? 9724 pts/0??? Sl?? Apr30?? 0:09 redis-server *:6382 [cluster]?
  • root????? 7311? 0.2? 0.9 137436? 9776 pts/0??? Sl?? Apr30?? 0:09 redis-server *:6383 [cluster]?
  • root????? 7316? 0.2? 0.9 137436? 9944 pts/0??? Sl?? Apr30?? 0:10 redis-server *:6384 [cluster]?
  • root????? 7478? 0.0? 0.0 103256?? 812 pts/0??? S+?? 00:56?? 0:00 grep redis?
  • ?
  • [root@manage redis]# kill -9 7310? //關閉220 6382端口,看數據會不會丟失?
  • ?
  • [root@slave2 redis]# redis-trib.rb check 192.168.10.219:6379? //查看集群情況,任何接口都行?
  • Connecting to node 192.168.10.219:6379: OK?
  • Connecting to node 192.168.10.220:6384: OK?
  • Connecting to node 192.168.10.219:6381: OK?
  • Connecting to node 192.168.10.220:6383: OK?
  • Connecting to node 192.168.10.219:6380: OK?
  • >>> Performing Cluster Check (using node 192.168.10.219:6379)?
  • M: d40d9a367c24784b0336c7b80fb4c87337e2cba6 192.168.10.219:6379?
  • slots:5461-10922 (5462 slots) master?
  • 1 additional replica(s)?
  • S: 5f00f163d0c0a540ea99daf004f55588a802327b 192.168.10.220:6384?
  • slots: (0 slots) slave?
  • replicates d40d9a367c24784b0336c7b80fb4c87337e2cba6?
  • S: b3b1a848987b5a87a06888e126d5c9b16f871ff5 192.168.10.219:6381?
  • slots: (0 slots) slave?
  • replicates d2eb5a8a77f87888792428aed4692dfb907e7a1d?
  • M: d2eb5a8a77f87888792428aed4692dfb907e7a1d 192.168.10.220:6383?
  • slots:10923-16383 (5461 slots) master?
  • 1 additional replica(s)?
  • M: a87d207204a53ab599bf7f6ffb9d679d0eef4f25 192.168.10.219:6380?
  • slots:0-5460 (5461 slots) master?
  • 0 additional replica(s)?
  • [OK] All nodes agree about slots configuration.?
  • >>> Check for open slots...?
  • >>> Check slots coverage...?
  • [OK] All 16384 slots covered.? //變成,三主二從了?
  • ?
  • [root@slave2 redis]# redis-cli -c -p 6379 -h 192.168.10.219??? //219登錄?
  • 192.168.10.219:6379> get tank?
  • -> Redirected to slot [4407] located at 192.168.10.219:6380?? //數據被轉到了6380節點了?
  • "tank1"?
  • # redis-cli -c -p 6379 -h 192.168.10.219 //在219登錄 192.168.10.219:6379> set tank tank1 //設置測試值 -> Redirected to slot [4407] located at 192.168.10.220:6382 OK //直接轉向到220 6382端口,數據存到了220 6382,不過有點奇怪 192.168.10.220:6382> get tank //可以取到值 "tank1"[root@manage redis]# redis-cli -c -p 6383 -h 192.168.10.220 //220機器,6383端口 192.168.10.220:6383> get tank -> Redirected to slot [4407] located at 192.168.10.220:6382 //直接轉向220 6382端口 "tank1"[root@manage redis]# ps aux |grep redis //查看進程 root 7310 0.2 0.9 137436 9724 pts/0 Sl Apr30 0:09 redis-server *:6382 [cluster] root 7311 0.2 0.9 137436 9776 pts/0 Sl Apr30 0:09 redis-server *:6383 [cluster] root 7316 0.2 0.9 137436 9944 pts/0 Sl Apr30 0:10 redis-server *:6384 [cluster] root 7478 0.0 0.0 103256 812 pts/0 S+ 00:56 0:00 grep redis[root@manage redis]# kill -9 7310 //關閉220 6382端口,看數據會不會丟失[root@slave2 redis]# redis-trib.rb check 192.168.10.219:6379 //查看集群情況,任何接口都行 Connecting to node 192.168.10.219:6379: OK Connecting to node 192.168.10.220:6384: OK Connecting to node 192.168.10.219:6381: OK Connecting to node 192.168.10.220:6383: OK Connecting to node 192.168.10.219:6380: OK >>> Performing Cluster Check (using node 192.168.10.219:6379) M: d40d9a367c24784b0336c7b80fb4c87337e2cba6 192.168.10.219:6379slots:5461-10922 (5462 slots) master1 additional replica(s) S: 5f00f163d0c0a540ea99daf004f55588a802327b 192.168.10.220:6384slots: (0 slots) slavereplicates d40d9a367c24784b0336c7b80fb4c87337e2cba6 S: b3b1a848987b5a87a06888e126d5c9b16f871ff5 192.168.10.219:6381slots: (0 slots) slavereplicates d2eb5a8a77f87888792428aed4692dfb907e7a1d M: d2eb5a8a77f87888792428aed4692dfb907e7a1d 192.168.10.220:6383slots:10923-16383 (5461 slots) master1 additional replica(s) M: a87d207204a53ab599bf7f6ffb9d679d0eef4f25 192.168.10.219:6380slots:0-5460 (5461 slots) master0 additional replica(s) [OK] All nodes agree about slots configuration. >>> Check for open slots... >>> Check slots coverage... [OK] All 16384 slots covered. //變成,三主二從了[root@slave2 redis]# redis-cli -c -p 6379 -h 192.168.10.219 //219登錄 192.168.10.219:6379> get tank -> Redirected to slot [4407] located at 192.168.10.219:6380 //數據被轉到了6380節點了 "tank1"

    經測試,集群是可用的。

    ?

    http://blog.51yip.com/nosql/1725.html

    轉載于:https://www.cnblogs.com/tianciliangen/p/4988325.html

    總結

    以上是生活随笔為你收集整理的redis cluster 集群 安装 配置 详解的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。