Store Sessions in Db

I am interested in learning more about this.
When is it a good idea?
How to do it.
I have users who need to keep a few hundred db rows in session.

What does anybody have to say about this?

Thanks in Advance.

Don’t forget to tell us about your stack!

OS: ???
Java Version: ???
Tomcat Version: ???
Lucee Version: ???

Lucee already supports using a DB for sessions and also logging

basically there’s a flag on a datasource which enables using it for session storage

We do this, and have done this for two decades (going WAY back to early CF days)…

We went this way so we can support load-balanced web servers (without sticky connections).

Never had a problem with it… But a few things to think about:

  1. Read the link Zackster shared.
  2. Tune your cf_client_vars db with appropriate indexed as it will get big (depending on timeouts)
  3. Does not support JEE session type - which has recently been causing us issues with the “Secure” flag for the CFID / CFTOKEN cookies (see other thread)