1. 程式人生 > >redis cluster VS tw

redis cluster VS tw

cal replica In BE cas ica pre bash pac

技術分享圖片搭建集群腳本#/bin/bash/usr/local/bin/redis-server /usr/local/redis-cluster/30001/redis.conf/usr/local/bin/redis-server /usr/local/redis-cluster/30002/redis.conf/usr/local/bin/redis-server /usr/local/redis-cluster/30003/redis.conf/usr/local/bin/redis-server /usr/local/redis-cluster/30004/redis.conf/usr/local/bin/redis-server /usr/local/redis-cluster/30005/redis.conf/usr/local/bin/redis-server /usr/local/redis-cluster/30006/redis.conf/usr/local/redis-4.0.2/src/redis-trib.rb create --replicas 1 127.0.0.1:30001 127.0.0.1:30002 127.0.0.1:30003 127.0.0.1:30004 127.0.0.1:30005 127.0.0.1:30006技術分享圖片新增節點
技術分享圖片/usr/local/redis-4.0.2/src/redis-trib.rb add-node 127.0.0.1:30007 127.0.0.1:30001技術分享圖片技術分享圖片但還不能使用,要激活/usr/local/redis-4.0.2/src/redis-trib.rb reshard 127.0.0.1:30001技術分享圖片技術分享圖片1、tw是一層代理,對外提供一個VIP;cluster是與後端節點直連2、tw不可平滑擴容(期間會丟部分key),cluster可以(期間會移動slot,客戶端透明無感知);

redis cluster VS tw