Users Pricing

forum

home / developersection / forums / servlet session attribute size and lifetime

Servlet session attribute size and lifetime

Anonymous User 2455 03 Dec 2015
1) What is an acceptable size range of objects that should be attached to a session? If I attach an object that can be 5k, and I have 10k valid sessions at any given time, that's 50MB of memory which seems acceptable to me. Is that a valid way to approach the issue, or are there other significant concerns?

2) This is probably a dumb question, but if I attach an object to a session with a 2 week lifetime, can I access the attribute as though it were in memory for the whole duration of the session?

3) Is there any reason NOT to always persist session information to a DB?

I am a content writter !


1 Answers

Anonymous User 03 Dec 2015 Accepted Answer