Running Redis in an active-active pattern keeps cache endpoints available during node maintenance and allows client traffic to be spread across more than one node instead of relying on a single primary instance.
A Pacemaker cluster managed with pcs controls services as resources, starts and stops them via systemd, and monitors health to restart or recover failed instances. Cloning a resource tells Pacemaker to run the same service on multiple nodes at the same time, with placement rules enforcing limits such as one instance per node.
Cloning a service only manages processes and placement, not data consistency or multi-writer replication. Confirm a Redis design that supports multi-node access (for example Redis Cluster or a vendor active-active implementation), and verify client routing, authentication, persistence, and firewall rules before placing the service under pcs control.
$ sudo pcs status Cluster name: clustername Cluster Summary: * Stack: corosync (Pacemaker is running) * Current DC: node-01 (version 2.1.6-6fdc9deea29) - partition with quorum * 3 nodes configured * 0 resource instances configured ##### snipped #####
$ systemctl list-unit-files --type=service | grep -E '^(redis|redis-server)\.service' redis-server.service disabled enabled
$ sudo systemctl disable --now redis-server.service Synchronizing state of redis-server.service with SysV service script with /usr/lib/systemd/systemd-sysv-install. Executing: /usr/lib/systemd/systemd-sysv-install disable redis-server ##### snipped #####
Stopping Redis immediately disconnects current clients on that node.
$ sudo pcs resource create redis_service systemd:redis-server op monitor interval=30s
Use systemd:redis when the unit name is redis.service.
Related: How to create a Pacemaker resource
$ sudo pcs resource clone redis_service
Cloning a standalone Redis configuration does not create shared state and can lead to inconsistent keys across nodes.
$ sudo pcs status resources
* Clone Set: redis_service-clone [redis_service]:
* Started: [ node-01 node-02 node-03 ]
Use a load balancer or DNS strategy that removes unhealthy nodes and matches the chosen Redis topology.
$ redis-cli -h node-01 PING PONG $ redis-cli -h node-02 PING PONG
Add -p <port> for a non-default port and -a <password> when authentication is enabled.