So I have been trying to understand how Redis works but I am wondering about the failover aspect difference between Redis and Memcached in Moodle.
With memcached, I can put in the cache_server1 and cache_server2 in config.php for sessions and in MUC, I can list the servers. If cache_server1 goes down or does not have the cache it was looking for, Moodle knows to go to cache_server2. Fairly simple set up compared to what I have read about Redis.
With Redis, I am only seeing 1 hostname I can list. I would assume that would be the master Redis server. But should the master node of the Redis cluster fail, how does Moodle know the new master server after the newly elect-master server is decided by the slave Redis servers?
Would I need to set up a HAProxy or some other method where the server listed in config.php/MUC never changes no matter what server in the cluster is the master?
Example of a set up I have seen online: http://engineering.bloomreach.com/the-evolution-of-fault-tolerant-redis-cluster/
https://redis.io/topics/cluster-tutorial
https://redis.io/topics/cluster-spec
It makes sense that Moodle would leave the fail-over for caching to be handled by Redis just like how Moodle does not try to handle fail-over for the database but i wanted to make sure I am not overlooking something. It was very nice the fail-over of in Memcached could be handled easily within the Moodle and memcached.ini .