bind 0.0.0.0
protected-mode yes
port 6379
tcp-keepalive 60
pidfile /var/run/redis_6379.pid
replica-read-only yes
requirepass admin
appendonly yes
appendfilename "appendonly.aof"
appendfsync everysec
bind 0.0.0.0
protected-mode yes
port 6379
tcp-keepalive 60
pidfile /var/run/redis_6379.pid
replicaof <masterip> <masterport>
masterauth admin
requirepass admin
replica-read-only yes
appendonly yes
appendfilename "appendonly.aof"
appendfsync everysec
# docker-compose up -d redis-m1
# docker-compose up -d redis-m2
# docker-compose up -d redis-m3
# docker-compose exec redis-m1 bash
# redis-cli -h 127.0.0.1 -p 6379 -a admin
> info replication
> set hello 'world'
> get hello
# docker-compose exec redis-m2 bash
# redis-cli -h 127.0.0.1 -p 6380 -a admin
> (error) READONLY You can't write against a read only replica.
> slaveof no one
> slaveof 127.0.0.1 6379
https://www.linode.com/docs/guides/how-to-install-and-configure-a-redis-cluster-on-ubuntu-1604/
https://www.digitalocean.com/community/tutorials/how-to-configure-redis-replication-on-ubuntu-16-04