this could just as easily be in the server settings board... but, there is the 2.0.x aspect to it, too.
I have several servers in a stack- physically separate servers. each of them are running apache4 (2.4), php7.0, and in a centos 6.9 build.. each of them are running memcache and memcached's latest build.
SMF on the production server sniffs out memcached just fine- and is running in level1 cache mode. memcache is also loaded (field populated) with that servers IP and the memcache's port.
i want to spread the load to the other servers.
if i were doing this for sessions, in php.ini or httpd.cnfg i would simple use memcache as the handler, and the repository would be:
session.save_handler = memcache ;<sets the handler
session.save_path = 'tcp://ip.ip.ip.ip:11211,tcp://ip.ip.ip.ip:11211' ;<sets the paths for sessions, this example two servers
memcache.allow_failover=1 ;<the infamous php glitch that is required to be negotiated
memcache.session_redundancy=3 ;<adding the glitch to the redundancy equals 3 not 2
and that^ sets up the sessions magic across the two...
i'm also reading that running this:
$memcache = new Memcached();
$memcache->setOption(Memcached::OPT_DISTRIBUTION, Memcached::DISTRIBUTION_CONSISTENT);
#the weight argument is optional
#all 2 servers have equal weight
#they are all equally likely to be selected.
$memcache->addServers(array(
array('ip.ip.ip.ip', 11211, 25), //server 1
array('ip.ip.ip.ip', 11211, 25), //server 2
));
^ensures the load is evenly spread instead of weighing one server down.
now my question is if this is required while using SMF's admin area for cache>memcache settings? or, is simply providing the IP and the port sufficient, and SMF negotiates the rest? i mean, if SMF negotiates this, that's great- awesome, actually... but how does it set it on both servers? (the above code has to be duplicate on both? SMF is only loaded on the one- does it just forward the cache using memcache servers proxy?)...
thank you tremendously in advance!!!!