Re: Why use sessions and not DB?
| From: | Michael Kimsal | Date: | Tue, 29 Aug 2000 23:40:24 +0000 |
| Subject: | Re: Why use sessions and not DB? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-14268@lists.php.net to get a copy of this message | ||
I replied about this a bit before, but I'll elaborate some.
Using freetds - current version is giving us slowdowns on queries over 500 bytes
(size of query, not resultset).
May NOT be an issue with other drivers, I dunno.
As for increasing load on webservers, that's why there are more of them.
There's only one db, and decreasing the load on it (i/o, datatable sizes, etc).
should be a Good Thing, shouldn't it?
The compress/uncompress is so far seeming to be a minimal impact (<5 ms,
no noticeable CPU usage)
Kris Dahl wrote:
> on 8/29/00 3:34 PM, Michael Kimsal at michael@tapinternet.com wrote:
>
> > Agreed. Storing session info into database will let you scale
> > to multiple front end machines much easier. If that's even a
> > remote possibility, you'd want to store info in a db.
> >
> > We've been gzcompressing large amounts of session data
> > (large shopping carts) before writing to the database. Now instead of
> > continually sending receiving 1-2k chunks across the wire between
> > server and db, we send 300-400 bytes each time, which is helping
> > speed things up.
>
> I am suprised that you are having to compress session data before sending it
> to the db server... Seems like that would put more of a load on the machines
> than you would gain. What sort of setup are you running (like number of web
> servers, db servers, how they are connected, etc.)?
>
> We send all the session data from the web servers to the db server in
> uncompressed format and it has only a minimum effect on performance (if at
> all). Mind you we have a decent machines performing these actions. Also we
> are not load balancing--really just load shaping with round robin DNS to a
> couple web servers that are using Linux HA/heartbeat. So users aren't
> getting handed off from web server to web server so much--but if they were
> it would work without missing a beat.
>
> -k
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
==========================
Michael Kimsal
http://www.tapinternet.com
734-480-9961