Hi,
I'm working on a VBScript application on IIS6 and I'm looking for some
advice about the best way of replacing or improving session variable usage.
The application is in a secure extranet environment. Currently the
application has a search customers page with 10 search fields which list the
results below the search fields. The requirement for this screen was that
the user could return to this result page at any point from any page in the
application and see his last set of results.
As a quick fix I used session variables to store the search values and
loaded them into the search page upon return. Works fine and didn't worry
me too much about using 10 session vars.
Now the users want similar functionality on all search screens (another 6)
giving me a potential of 60 session variables for search results (on top of
about another 10 legacy session vars).
Suddenly I am worried about 70 session variables, potentially containing
reasonably long strings, with a 2 hour session timeout for a potential 1000
users.
What would people recommend I do to either replace the session variables or
improve performance of them.
My thoughts are:
1. Store in the database alongside the user record. I'm already retrieving
the user record on most pages so it would be a case of getting the extra 60
fields from the DB when required. Would also provide cross session result
persistence.
2. Cookies. Have only ever used sparingly. Would this be too much data
for storing in cookies ? Any performance trade-off ?
3. Store an array/arrays in fewer session variables. Each search result
page could just have one session variable with an array of all the search
field values for that page. Would one session variable containing an array
be much better than 10 session variables ?
4. Just use the 70 session variables and stick more memory in the server if
we get issues. Probably the cheapest and easiest solution, though not the
right one I'm sure.
Any advice would be much appreciated as I'm kind of at the limit of what I
know about performance issues.
Many thanks,
Larry.