
可以:主服务负责写从服务负责读从服务下可以多个从服务
redis-cli -h 127.0.0.1 -p 6378 info Replication默认-p 6379
redis_1.conf
port 6379bind 172.16.0.1daemonize yespidfile 6379.pidcluster-enabled yescluster-config-file 6379_node.confcluster-node-timeout 15000appendonly yes
redis_2.conf
port 6379bind 172.16.0.2daemonize yespidfile 6379.pidcluster-enabled yescluster-config-file 6379_node.confcluster-node-timeout 15000appendonly yes
redis_3.conf
port 6379bind 172.16.0.3daemonize yespidfile 6379.pidcluster-enabled yescluster-config-file 6379_node.confcluster-node-timeout 15000appendonly yes
启动命令redis-server redis_1.confredis-server redis_2.confredis-server redis_3.conf