Hands-on task
A Redis replica on a second port
The main Redis with order data runs on port 6379. Bring up a replica next to it:
- a second
redis-serverinstance on port 6380, running in the background (as a daemon); - data directory —
/var/lib/redis-6380; - it replicates
127.0.0.1:6379and receives all of its data; - the replica is read-only — writes to it must be rejected.
Don't restart or change the main instance.
- redis
- replication
- replicaof
- INFO replication
- read-only replica