Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what should I take into consideration when choosing a session implementation?

Tags:

django

session

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.

like image 569
satoru Avatar asked Nov 14 '22 11:11

satoru


1 Answers

/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.

like image 178
NeuroScr Avatar answered Dec 21 '22 21:12

NeuroScr