Re: [CDBI] Re: Serializing a CDBI object
"Perrin Harkins" <[email protected]> Thu, 3 May 2007 11:57:08 -0400
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
On 5/3/07, Bill Moseley <[email protected]> wrote: > In that you can lose session data? Yes. > Cache::FastMmap is the same way > and is often used for session data. That's a bad idea too. It's somewhat safer than memcached, since at least you don't lost all your data if there's a problem, but it is still designed to silently drop data. > Just looking at options at this point, but thinking about > session stores when using a number of web servers on different > machines -- and not using sticky sessions. So the session data has to > be available to all servers. Well, if it's data, and it's important, it's hard to see why it shouldn't go in the database. I often see people spend a lot of time tuning their database and building backup and failover systems for it, and then put their sessions into a totally different system. But I should get off my high horse because sometimes people just decide session data is not important. You have to make a choice about what's appropriate for your site. For example, I read an article about the architecture of MySpace where they said that they essentially don't care if their users lose session data and get logged out or have other problems, so they store it in a very fast and unreliable way. That can work for some people. > The database might indeed turn out to be the best approach, but also > considering ways to reduce the load on the database. A write-through cache with memcached or the like will accomplish that if the sessions are read more than written. - Perrin