配置redis主从节点
vi /etc/redis/6379.conf
在slave node上配置:
slaveof 192.168.1.1 6379
slave-read-only yes
masterauth 123456
在master node上配置:
requirepass 123456
bind 0.0.0.0
启动:redis-cli -h ipaddr
使用 :info replication查看信息
压力测试:
cd redis-3.2.8/src
./redis-benchmark -h ipaddr