Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP.INI & session.save_path & ElastiCache

Below is from http://php.net/manual/en/memcache.ini.php#ini.memcache.hash-strategy

session.save_path string Defines a comma separated of server urls to use for session storage, for example "tcp://host1:11211, tcp://host2:11211".

Question: AWS ElastiCache gives you node endpoints and a configuration endpoint (which I believe is a DNS CNAME to the ElastiCache Cluster).

If I put the configuration endpoint value into session.save_path will this mean Sessions use the Cluster rather then a specific node and therefore always use an active node?

I understand if a node is rebooted/removed the data held will be lost and therefore sessions on that node will be lost.

thank you!

like image 992
Adam Avatar asked Jul 02 '26 18:07

Adam


1 Answers

No, it does not work that way. You need to use the Amazon memcached client that has support for Auto Discovery.

http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/AutoDiscovery.html

like image 148
craig.tadlock Avatar answered Jul 05 '26 11:07

craig.tadlock



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!