> We have one big server that serves our rails web application. > > I'm new to using memcached and I'm planning to use it for storing session > data, I mean as a session store. What happens if memcache consumes too much > memory? Should I monitor the memcached process now and then and restart it? > Or, can I set memory limits for it so that it won't exceed the allocated > space?
You shouldn't use memcached as a persistent storage. Your issue as a rule implemented in the following maner: - store the session's data in the persistent storage (DB, files etc.) - cache the session's data in the memcached All the read requests should go to the memcached. If there is an empty result - go to the persistent storage and cache the result in the memcached. All the write requests should update the both persistent storage and memcached.
