Advantage Description :
1. memcached is a memory cache that can read and write faster than regular files
2. Can solve the problem of multiple server common session
Drawback Description :
1. Session data is stored in memory, persistence is deficient, but it is not a problem for session data
2. You can also use other persistent systems to store sessions, for example: Redis,ttserver
3. High-performance concurrency scenarios, the efficiency of cookies is much better than the session, so many large websites will use cookies to solve the problem of session sharing
Configuring PHP files on the ①web server, specifying the cache server as the session server
Configuration in Vim/application/php/lib/php.ini php.ini
1461:session.save_handler = Memcache
1490:session.save_path = "tcp://10.0.0.100:11211"
Using the memcached memory cache software to achieve session-preserving configuration, just modify the php.ini corresponding to the above parameters, the value of the above can be
② caching service on cache server as session server
Memcached-m 16m-p 11211-d-u root-c 8192
This article from "Write a blog Money" blog, please be sure to keep this source http://dadonggg.blog.51cto.com/12672150/1950171
Memcached realize the advantages and disadvantages of session shared storage in a cluster