I am using memcached for my sessions on my multiserver setup. Session data is not shared between servers.
- On-Premise Server + WebMail Multi-Server Installations: Version 7.5.2+
- WebMail Only Multi-Server Installations: Version 7.5.2+
Memcached not configured for multiserver use.
Install memcached via:
yum install memcached.x86_64
Update config for memcached via
Find the following line:
Replace with your private IP e.g:
Do this on every server you're running memcached on.
Update the lines
";session.save_path = "/tmp"" and
"session.save_handler = files" in
session.save_handler = memcache
session.save_path = 'tcp://10.0.10.1:11211,tcp://10.0.10.2:11211,tcp://10.0.10.3:11211'
Create a file within
/etc/php/conf.d/ called memcached.ini and add the following:
memcache.session_redundancy should be your total memcached servers +1, in this example we have 3 so memcache.session_redundancy is 4. If you had 4 memcached servers, the value would be 5.
Once this is done, run:
service httpd restart
Your memcached system should now be OK and you should now be able to set memcached as your session system within webadmin, adding each IP into the host section.