91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

redis cluster集群動態伸縮--刪除主從節點

發布時間:2020-06-02 21:24:32 來源:網絡 閱讀:806 作者:hgditren 欄目:關系型數據庫

目標:從集群中剔除一組主從(5007,5008)

經過上一節增加5007,5008主從服務節點后,目前集群的情況是這樣的:

b3363a81c3c59d57143cd3323481259c044e66d2 192.168.8.196:5006@15006 slave 1b7aa419065c5477c0def9d5e25106963fbdda76 0 1573003356000 3 connected
1b7aa419065c5477c0def9d5e25106963fbdda76 192.168.8.196:5003@15003 master - 0 1573003352829 3 connected 11089-16383
fbf9f23ecf0fea399debf7db42c73fece04b98fd 192.168.8.196:5005@15005 slave b1b67d4e554e29605bdbe40deab6670a42dd8836 0 1573003356842 2 connected
b1b67d4e554e29605bdbe40deab6670a42dd8836 192.168.8.196:5002@15002 master - 0 1573003355000 2 connected 5628-10922
d1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 192.168.8.196:5001@15001 master - 0 1573003354837 1 connected 166-5460
9dc870942555447543694e42e40061823ed91271 192.168.8.196:5004@15004 slave d1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 0 1573003357846 1 connected
63aa476d990dfa9f5f40eeeaa0315e7f9948554d 192.168.8.196:5007@15007 master - 0 1573003356000 7 connected 0-165 5461-5627 10923-11088
d3a9de370962873d17f1124bcf9ac166cc6ba950 192.168.8.196:5008@15008 myself,slave 63aa476d990dfa9f5f40eeeaa0315e7f9948554d 0 1573003350000 0 connected
序號 master node slave node
1 192.168.8.196:5001 192.168.8.196:5004
2 192.168.8.196:5002 192.168.8.196:5005
3 192.168.8.196:5003 192.168.8.196:5006
4 192.168.8.196:5007 192.168.8.196:5008

開始實施:
1.先移除 192.168.8.196:5008 從節點

redis-cli --cluster del-node 192.168.8.196:5008 d3a9de370962873d17f1124bcf9ac166cc6ba950

>> Removing node d3a9de370962873d17f1124bcf9ac166cc6ba950 from cluster 192.168.8.196:5008
>> Sending CLUSTER FORGET messages to the cluster...
>> SHUTDOWN the node.
>>

此時,192.168.8.196:5008 從節點已被刪除。

192.168.8.196:5001> cluster nodes
b3363a81c3c59d57143cd3323481259c044e66d2 192.168.8.196:5006@15006 slave 1b7aa419065c5477c0def9d5e25106963fbdda76 0 1573004309001 6 connected
9dc870942555447543694e42e40061823ed91271 192.168.8.196:5004@15004 slave d1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 0 1573004310000 4 connected
1b7aa419065c5477c0def9d5e25106963fbdda76 192.168.8.196:5003@15003 master - 0 1573004311007 3 connected 11089-16383
b1b67d4e554e29605bdbe40deab6670a42dd8836 192.168.8.196:5002@15002 master - 0 1573004307000 2 connected 5628-10922
63aa476d990dfa9f5f40eeeaa0315e7f9948554d 192.168.8.196:5007@15007 master - 0 1573004307000 7 connected 0-165 5461-5627 10923-11088
fbf9f23ecf0fea399debf7db42c73fece04b98fd 192.168.8.196:5005@15005 slave b1b67d4e554e29605bdbe40deab6670a42dd8836 0 1573004310004 5 connected
d1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 192.168.8.196:5001@15001 myself,master - 0 1573004308000 1 connected 166-5460
  1. 對192.168.8.196:5007 主節點從新分片,將5007上的分片轉移到其他節點

    $ redis-cli --cluster reshard 192.168.8.196:5007

會出現一下問答對話項

#需要移動數據槽的數量
How many slots do you want to move (from 1 to 16384)? 500
#需要接受數據槽的主節點ID,這里我們填寫5001號主服務節點ID
What is the receiving node ID? d1a4b1aa3e924a5917efc240cdb2e3ada39e01c2
#填寫數據槽來源節點
Please enter all the source node IDs.
  Type 'all' to use all the nodes as source nodes for the hash slots.
  Type 'done' once you entered all the source nodes IDs.
Source node #1: 63aa476d990dfa9f5f40eeeaa0315e7f9948554d
Source node #2: done

執行結束后,5007號主節點上的數據槽已經被轉移到5001號主節點上。此時,5007上沒有任何數據槽了。

b3363a81c3c59d57143cd3323481259c044e66d2 192.168.8.196:5006@15006 slave 1b7aa419065c5477c0def9d5e25106963fbdda76 0 1573004510000 6 connected
9dc870942555447543694e42e40061823ed91271 192.168.8.196:5004@15004 slave d1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 0 1573004510589 8 connected
1b7aa419065c5477c0def9d5e25106963fbdda76 192.168.8.196:5003@15003 master - 0 1573004508000 3 connected 11089-16383
b1b67d4e554e29605bdbe40deab6670a42dd8836 192.168.8.196:5002@15002 master - 0 1573004510000 2 connected 5628-10922
63aa476d990dfa9f5f40eeeaa0315e7f9948554d 192.168.8.196:5007@15007 master - 0 1573004508000 7 connected
fbf9f23ecf0fea399debf7db42c73fece04b98fd 192.168.8.196:5005@15005 slave b1b67d4e554e29605bdbe40deab6670a42dd8836 0 1573004511594 5 connected
d1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 192.168.8.196:5001@15001 myself,master - 0 1573004509000 8 connected 0-5627 10923-11088

3.最后一步,剔除192.168.8.196:5007

$ redis-cli --cluster del-node 192.168.8.196:5007 63aa476d990dfa9f5f40eeeaa0315e7f9948554d

>>> Removing node 63aa476d990dfa9f5f40eeeaa0315e7f9948554d from cluster 192.168.8.196:5007
>>> Sending CLUSTER FORGET messages to the cluster...
>>> SHUTDOWN the node.

4.5007,5008主從節點已被剔除,大功告成。

192.168.8.196:5001> cluster nodes
b3363a81c3c59d57143cd3323481259c044e66d2 192.168.8.196:5006@15006 slave 1b7aa419065c5477c0def9d5e25106963fbdda76 0 1573004592840 6 connected
9dc870942555447543694e42e40061823ed91271 192.168.8.196:5004@15004 slave d1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 0 1573004591000 8 connected
1b7aa419065c5477c0def9d5e25106963fbdda76 192.168.8.196:5003@15003 master - 0 1573004591000 3 connected 11089-16383
b1b67d4e554e29605bdbe40deab6670a42dd8836 192.168.8.196:5002@15002 master - 0 1573004591838 2 connected 5628-10922
fbf9f23ecf0fea399debf7db42c73fece04b98fd 192.168.8.196:5005@15005 slave b1b67d4e554e29605bdbe40deab6670a42dd8836 0 1573004591000 5 connected
d1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 192.168.8.196:5001@15001 myself,master - 0 1573004589000 8 connected 0-5627 10923-11088
向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

探索| 乌拉特中旗| 隆昌县| 金塔县| 富顺县| 金山区| 青海省| 平顶山市| 龙江县| 美姑县| 阜宁县| 昭通市| 韩城市| 柳林县| 太原市| 长寿区| 兴安盟| 光泽县| 郸城县| 汉中市| 乳源| 张家界市| 读书| 北辰区| 哈尔滨市| 那坡县| 外汇| 洪江市| 桐城市| 安图县| 大埔区| 九寨沟县| 鹿邑县| 宁晋县| 罗江县| 应城市| 珲春市| 嫩江县| 即墨市| 崇信县| 睢宁县|