Closed Xon closed 7 years ago
Thanks, Xon! Have you successfully tested this branch by any chance?
@colinmollenhour I thought it was being used on SpaceBattle forums, but a miss-configuration it wasn't being used. I fixed this and currently https://forums.spacebattles.com hits the sentinel to locate the master redis instance. I tested failover since one node was experiencing significant redis latency spikes, and shutting down the master forcing another slave to be prompted worked.
I need todo some testing/work before the load_from_slaves option can be used. I tried naively enabling, and it resulted in a newly created session (backed by Redis) failing. My fix will be to use the master when Xenforo reads the session.
The sentinel support (less the load from slaves) code is being executed ~2.5 million times a day, so looks good to me!
I'm confused, are you using Cm_Cache_Backend_Redis as a session backend?
Yes, XenForo can use a Zend_Cache instance for the session store vs the database. It doesn't require (or use) php session locking.
Ahh. Just an FYI, if you do want locking or other advanced features like adjusting lifetimes for bots and such you might want to look at https://github.com/colinmollenhour/php-redis-session-abstract
getRandomSlaveClient doesn't exist, note; the sentinel-and-slaves branch has a trivial merge conflict with master