On a e-commerce website, there would be millions of users, how can we handle (optimize) sessions for all of them. I am thinking that we have a timeout added for each session, so optimization seems unnecessary. But this turns out not-quite-true. I would love to learn why and how we answer this simple question. Thank you
Share
Sessions are stored in FileSystem so actually unless your app requires lot of burn-out scratch on your harddrive, sessions are OK.
3 possibilities:
RAMDISK – Perfect alternative on windows. Disk on versatile RAM. No consequences except that your memory freeup has to be good in your application.
COOKIES – Y bother sessions when you can store information on client’s machine? Sanitize cookies well.
Database – You can store information in “temporary” databases instead of session. However, this would be an alternative and not answer to the question so, I will stop right here.
Sessions are like coins with 2 sides.