NYCPHP Meetup

[nycphp-talk] php scalability

Lee Semel lsemel at yahoo.com
Wed Aug 13 22:34:32 EDT 2003


It's not always the case that load balancing is independent of the scripting language.  Here's a specific example of something that's automatic in Java, but needs to be programmed into the application in PHP: 
 
In a load balanced setting, a user can be switched from one server to another as they use the site.  So the session needs to be available to all servers, and stored in the database.  Java application servers such as JBoss or Weblogic can take care of this automatically, making the session available to all servers without you having to do anything special.  But in PHP, we have to know in advance that this is a problem, so we can set up the session to work this way.
 
Another issue is deploying or upgrading the application on multiple servers, especially if several versions need to be kept around.  I can zip a Java application into a WAR file and send it to all the servers at once, and the configuration and security settings live nicely in a separate web.xml file.  The WAR file can even contain all the automated tasks that would be done by cron jobs.  But in PHP, you need to keep track of all the individual little files in the app, track changes to php.ini files and httpd.conf files, include files, include paths, .htaccess files, PEAR libraries, and cron jobs, all of which can get out of sync and mixed up very easily.  
 
Neither of these is a big deal in itself, but I'm wondering what other red flags there would be to make PHP work in a load balanced setting, so I can get an idea of the relative cost and effort versus Java.  If there are a lot of tricky little things like this, they can add up to a big job.  I'd like to do it in PHP if at all possible.
 

Analysis & Solutions <danielc at analysisandsolutions.com> wrote:
Lee:

On Wed, Aug 13, 2003 at 04:30:04PM -0700, Lee Semel wrote:

> How would you set up load balancing and failover on a PHP site? Is there
> any particular way you would design the application up front to make 
> this easier? I'm interesting in hearing your suggestions.

I'm no expert on massive deployments, but from what I understand, the load
balancing has to do with routers and other traffic management
software/hardware. The scripting language on each server operates
independently, processing the requests that have been directed to it's
server.

--Dan

-- 
FREE scripts that make web and database programming easier
http://www.analysisandsolutions.com/software/
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk


---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030813/02a06ea1/attachment.html>


More information about the talk mailing list