Reputation: 33225
Yesterday, my supervisor told me that tmp-file-based session should be THE answer to session implementation, and I should abandon any idea of making sessions persistent.
He argues that file-based session is much faster and eaiser to use than other choices like db-based or memcached-based implementations.
What he said was really a shock to my past learning experience, so please tell me whether he was wrong and why?
Thanks in advance.
Upvotes: 5
Views: 173
Reputation: 322
/dev/shm will be faster then memcache but you have to make sure all your http requests of the same session go to the same machine each time. Distributed solutions like db-based and Memcached don't have this problem when load balancing.
Upvotes: 1
Reputation: 24966
Your supervisor is smoking something. File-based sessions are persistent. You need need to move a disk head to get to them, unless they happen to be in the OS file cache. One disk head move pays for a lot of memecache.
And "easier" is relative. tmp-file based sessions are easy to set up, so he's marginally right on that point.
Upvotes: 0