Session storage

I’m in process of developing my first enterprise RoR application, and
I’m wondering which kind of session storage to use. I’ve looked over a
lot of stuff on the net (the very popular speed comparison, a few other
highly rated [by Google] sites that talk about it), but these don’t
really clarify exactly what I want to know.

Once this site goes into production, it’s going to have a pretty decent
sized system behind it… more than enough RAM to go around, tons of
disk space. What I’m wondering is, given that you have enough RAM that
even with very heavy loads you’re not going to run out, is using
memory_store a good idea?

Right now, as it is in development, I’m using a pstore setup because
there are only a few developers working on it, and when we test out the
production environment, it’s currently using a memory_store. I just
don’t know if that’s a good idea when it goes live and the boxes are
getting slammed.

Thanks,
Luke

On Oct 10, 2006, at 11:05 AM, Luke wrote:

decent
don’t know if that’s a good idea when it goes live and the boxes are
getting slammed.

Thanks,
Luke

Hey Luke-

I would say that you should use the ActiveRecord session store. If

that doesn’t perform well enough then switch to the mysql non AR
session store from stefan kaeyes. Then if you really need more oomph
you can use memcached for sessions. The normal memory cache session
that comes with rails will not work if you have more then one rails
process running. SO if you use more then one fcgi or mongrel the
normal memory store is not an option.

-Ezra

Ezra Z. wrote:

Hey Luke-

I would say that you should use the ActiveRecord session store. If
that doesn’t perform well enough then switch to the mysql non AR
session store from stefan kaeyes. Then if you really need more oomph
you can use memcached for sessions. The normal memory cache session
that comes with rails will not work if you have more then one rails
process running. SO if you use more then one fcgi or mongrel the
normal memory store is not an option.

Speaking of AR Session store and memcached, is there some way to use
memcached to cache the AR session store? I don’t want to use just
memcached for sessions because I want to be able to flush the cache
without destroying all the sessions. I’d like to keep the persistence.
I’m currently using cached_model to cache all my models, but the session
isn’t a model.

-matthew

Hey, thanks for the answer. I got another one in email, and that was
appreciated also. I’m definitely thinking about using memcached, I
will just have to spend the time learning how to set it up. Although,
I have to say the following posters question is a good one… is there
a way to use memcached and be able to flush the cache without
destroying active sessions?

Check out this really excellent article for all you need to know about
sessions.

Cheers
Tom