NYCPHP Meetup

NYPHP.org

[nycphp-talk] question about session and scalability

John Lacey jlacey at att.net
Wed Jan 7 19:45:39 EST 2004



Chris Hubbard wrote:

> All,
> Here's a weird question for you all.
> 
> Got a client who wants to run a couple different web servers, each 
> server running a copy of the same php application.  There will be some 
> sort (TBD) of load balancer between the servers and the internet.  And 
> there will be a separate server for the database.
> Users need to log into the application, and stay logged in while using 
> the application.  We want to be able to keep the users session open even 
> if one of the web servers crashes.  The users will be conducting 
> transactions (against PostgreSQL), so I can use the transaction login in 
> the database.
> 
> My understanding is that if we're using $_sessions and the server goes 
> down, then, the user looses their session (and any work they'd done).  
> One of the ideas we've come up with is using a cookie, so we know from 
> the inbound request who is making the request.  But I'm not keen on 
> cookies, for various reasons.
> 
> We're anticipating no more than 50 concurrent users at any given time.  
> I don't have an idea on how much load on a server a single user will be.
> 

Well Chris, on the face of it, that doesn't sound like an 
app that calls for load balancing at this point.  That, 
coupled with the [relatively] low odds of things crashing on 
users, it might be not be worth the effort.

So far as "losing work" it would seem that an app would be 
written in such a way to have relatively short commit 
cycles.  i.e. don't leave a transaction uncommitted that 
depends on a user "thinking things over at the keyboard"

Is there other compelling reasons why the client wants to 
run copies of the php app?

John








More information about the talk mailing list