At 02:02 PM 1/8/01 -0800, Sander van Zoest wrote:
>On Mon, 8 Jan 2001, Simon Rosenthal wrote:
>
> > an RDBMS is not much more trouble to purge, if you have a
> > time-of-last-update field. And if you're ever going to access your cache
> > from multiple servers, you definitely don't want to deal with locking
> > issues for DBM and filesystem based solutions ;=(
>
>RDBMS does bring replication and backup issues. The DBM and FS solutions
>definately have their advantages. It would not be too difficult to write
>a serialized daemon that makes request over the net to a DBM file.
>
>What in you experience makes you pick the overhead of an RDBMS for a simple
>cache in favor of DBM, FS solutions?
We cache user session state (basically using Apache::Session) in a small
(maybe 500K records) mysql database , which is accessed by multiple web
servers. We made an explicit decision NOT to replicate or backup this
database - it's very dynamic, and the only user visible consequence of a
loss of the database would be an unexpected login screen - we felt this was
a tradeoff we could live with. We have a hot spare mysql instance which
can be brought into service immediately, if required.
I couldn't see writing a daemon as you suggested offering us any
benefits under those circumstances, given that RDBMS access is built into
Apache::Session.
I would not be as cavalier as this if we were doing anything more than
using the RDBMS as a fast cache. With decent hardware (which we have - Sun
Enterprise servers with nice fast disks and enough memory) the typical
record retrieval time is around 10ms, which even if slow compared to a
local FS access is plenty fast enough in the context of the processing we
do for dynamic pages.
Hope this answers your question.
-Simon
>
>--
>Sander van Zoest [[EMAIL PROTECTED]]
>Covalent Technologies, Inc. http://www.covalent.net/
>(415) 536-5218 http://www.vanzoest.com/sander/
-----------------------------------------------------
Simon Rosenthal ([EMAIL PROTECTED])
Web Systems Architect
Northern Light Technology
One Athenaeum Street. Suite 1700, Cambridge, MA 02142
Phone: (617)621-5296 : URL: http://www.northernlight.com
"Northern Light - Just what you've been searching for"