LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > PHP > Clustered LSPHP Servers - Howto?

Reply
 
Thread Tools Display Modes
  #1  
Old 07-21-2011, 01:11 PM
Elik Elik is offline
Member
 
Join Date: Nov 2009
Posts: 24
Default Clustered LSPHP Servers - Howto?

Hello,

I been reading up on the LSAPI and I read this section, which I want t know more on how this can be accomplished and what is needed on the webserver and the dedicated PHP server itself in terms of the files in between.

Here is the reference:
Start PHP from command line

Usually, lsphp is managed by LiteSpeed web server in a single server installation. lsphp can be used in clustered environment with one LiteSpeed web server at the front, load balancing lsphp processes running on multiple backend servers. In such environment, lsphp can be start manually from command with option "-b ", socket address can be IPv4, IPv6 or Unix Domain Socket address.
for examples:

./lsphp -b [::]:3000

have lsphp bind to port 3000 on all IPv4 and IPv6 address,

./lsphp -b *:3000


So the question is, does the backend lsphp server need access to the /home directory where the php files are located or it can be just small drive with just PHP running on it and have it all on the LSWS installed server for the data processing. Plus, what about the mysql processes, does it come from the lsphp server or from lsws server itself.

Those are the questions I have so I can build a test system and test it accordly to see how it works and go from there. Just need some basic understanding on how it works to make it all work together.
Reply With Quote
  #2  
Old 07-21-2011, 03:17 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,390
Setup

a typical setup is as follows:
1. start lsphp from command line
PHP_LSAPI_MAX_REQUESTS=500 PHP_LSAPI_CHILDREN=35 /path/to/lsphp -b IP_addressort
2. setup external app (such as 'remote php') and script handler (for php handled by 'remote php' ext app) on web server.
external app:
address => IP_address: port (in step 1)
auto start => no

Note:

php scripts on local web server need to be rsync'd over to the lsphp server with the exact path.

a. if local web server is chroot'd, then chroot needs to map to file system root of the remote server. e.g. if web server chroot is /usr/local/opt, then /usr/local/opt/lsws/DEFAULT/html (default lsws vhost docroot) needs to be rsync'd over and placed on remote server as /lsws/DEFAULT/html.

b. If no chroot, then /usr/local/lsws/DEFAULT/html should be rsync'd over as /usr/local/lsws/DEFAULT/html.

mysql processes run on lsphp server or dedicated db server.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:45 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.