NYCPHP Meetup

NYPHP.org

[nycphp-talk] php scalability

Steve Manes smanes at magpie.com
Thu Aug 14 07:30:52 EDT 2003


Lee Semel wrote:
> Is there anything special in the programming of the application that 
> needs to be done to make it amenable to clustering, aside from keeping 
> session state in the database?

Actually, we don't maintain session state in the db.  We maintain very 
little session state other than the fact that the user has logged in and 
is known to the system.  This is carried from request to request in the 
user's encrypted cookie.  To further reduce database overhead, at login 
we load the cookie with most of the personal data the software wants to 
know about you so we don't have to hit the db for stuff like, "Hello, 
Lee".  One of the nice things about the clustering topography that 
Nicholas mentioned is that you can, if need be, maintain cookies 
specific to each named cluster.

As Nicholas said (and he's The Man when it comes to CCI's hardware 
infrastructure), in large scale applications the database is your choke 
point.  Anything you can do to reduce those requests in an environment 
where you might have tens of thousands of concurrent users is a definite 
win -- like for instance populating form pulldown data from web server 
cache rather than from the db.  You can always throw another inexpensive 
commodity web server, or ten, into the network but adding databases is 
more problematic.

---------------------------------------------=o&o>---------
Steve Manes          http://www.magpie.com
Brooklyn, NY





More information about the talk mailing list