Re: [PHP-DEV] Sessio variables and Load Balancing From: Chris Adams (chris <email protected>)
Date: 06/30/00

> At 02:40 PM 06/30/2000 -0700, you wrote:
> >The session read handler should be called once at the start of the page
and
> >the write handler once at the end. With a decent session handler, it's 2
> >queries per page (SELECT,UPDATE), with an additional INSERT when the
session
> >is first created and a DELETE when session_destroy() is called.
>
> Right, that is more efficient instead of re-inserting the data at every
> register or unregister call. But, if you work the numbers for a site that
> gets 25K worth of pageviews per day you are making an average of 1 query
> every 2 seconds just for session information. And that's average.. not
> what it would be during peak times and not including existing queries for
> content related stuff. That sounds sort of high just for serving
> pages. Maybe I'm wrong.

25K page views is low these days. The time spent on the queries in question
is under .01 seconds. If your site can handle the processing & queries to
generate your content, two more won't kill it. Also, I think you'd find that
with a fast database like MySQL and persistent connections it would actually
take longer to use the files handler which must open/read/close the session
file each time.

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>