redis cluster VS tw
阿新 • • 發佈:2018-06-04
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:300011、tw是一層代理,對外提供一個VIP;cluster是與後端節點直連2、tw不可平滑擴容(期間會丟部分key),cluster可以(期間會移動slot,客戶端透明無感知);
redis cluster VS tw