|
|

04-09-2007, 02:41 AM
|
|
Senior Member
|
|
Join Date: Apr 2007
Posts: 114
|
|
possible migration from lighttpd
Hi Litespeed folks!
This is kind of a "pre-sales" question, but I couldn't find any forum for that, so this forum seemed the most appropriate.
I migrated to lighttpd from apache a couple of years ago for performance reasons. Lighttpd was kind of flakey until version 1.4.13, which it seemed very stable. This was on my FreeBSD 6.x system.
I am now the proud owner of several Sun Fire servers (2- and 4-core AMD64 Opterons) running solaris 10. Three of the servers are dedicated to the web server / php activities like so:
server A: lighttpd only
server B and C: PHP 5.2.1 / fastcgi only (port 8002)
The idea was that 1 web server could be supported by numerous PHP servers. Server A could have php installed as well, but I didn't want to risk PHP activities impacting web server performance (with 2 core / 2GB ram this probably would not have happened though)
My brief perusal through litespeed documentation indicates that PHP LSAPI (and I assume PHP-fastcgi) is located on the same server as litespeed. Does it have to be?
My question is: can litespeed be set up in the same fashion as I currently have lighttpd (1 web server, multiple PHP slave nodes)?
For curiosity's sake:
My current setup of lighttpd 1.4.13 on solaris is also flaky. My PHP fastcgi processes (externally spawned) are frequently and randomly "dying" according to lighttpd logs, although they seem fine. This ends up with a 500 server error. Lighttpd is not crashing though. I compiled both lighttpd and php from source using sun's c compiler. I can't figure out why the setup is unstable, and lighttpd is, for all intents and purposes, unsupported. Jan disappears for weeks at a time, most cries for help on the forums go unanswered.
Last edited by jrmarino; 04-09-2007 at 02:43 AM..
|

04-09-2007, 08:19 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
Quote:
|
My brief perusal through litespeed documentation indicates that PHP LSAPI (and I assume PHP-fastcgi) is located on the same server as litespeed. Does it have to be?
|
No.
Quote:
|
My question is: can litespeed be set up in the same fashion as I currently have lighttpd (1 web server, multiple PHP slave nodes)?
|
Yes, no problem at all.
PHP LSAPI 3.0 module can be started from command line, please take a look at the README in the package.
On server A, you need configure two remote LSAPI application and a load balancer, add the two LSAPI application to the node list of load balancer.
Quote:
|
I can't figure out why the setup is unstable, and lighttpd is, for all intents and purposes, unsupported. Jan disappears for weeks at a time, most cries for help on the forums go unanswered.
|
It will never happen with LiteSpeed, basically, it is one of the major differences between hobby open source project and dedicate commercial proudct. :-)
Fixing bugs is one of our top priority.
|

04-11-2007, 03:27 AM
|
|
Senior Member
|
|
Join Date: Apr 2007
Posts: 114
|
|
|
Thanks -
On my server B, I have another instance of lighttd. In addition to servicing different websites, it also serves as a failover backup to server A. It uses the same externally spawned fastcgi processes. (in other words, the fastcgi PHP on server B accepts requests from both server A and Server B). How the failover should work is that the DNS servers detect the HTTP service on Server A has failed, so they dynamically change the IP address to server B. I have my doubts how well that will work in practice.
So my first followup question is: Is this setup also supported?
How I would foresee such a scenario:
I would set up server A with the enterprise dual-CPU version. On Server B, I would use the standard version since it's normal load is easily handled by the standard capabilities.
Second followup question:
I have 17 surges per year (currently). A surge lasts about 12 hours. It is during this time that I would need the capabilities of the enterprise server. What would the users see if there were more than 150 concurrent connections? This is a general question about using the standard version in a situation where the connection limit is reached. Are the pages just fetched slowly, or are the connections actually refused? (Know that I do not expect to ever have to use this backup capability)
|

04-11-2007, 08:00 AM
|
|
Senior Member
|
|
Join Date: Nov 2004
Posts: 288
|
|
|
I doubt that the dns-change will help much in that area as the dns is cached deeply.
I guess you are looking for a setup like mine ;-).
I'm having a main-webserver and a backup-webserver.
In litespeed I'm using the load-balanced fcgi backends which use their local and remote backends.
the systems are backed up through heartbeat which switches the external ip to the second machine if the first one fails (it just takes some seconds).
currently I'm evaluating some load-balancers / reverse proxies to have some better control about the distribution of traffic between the two machines instead of using the fcgi-load balancing.
Edit: Oh and I'm using a similar shared licensing. The main-server has a single-cpu enterprise edition and the backup-server just uses the standard-edition.
Last edited by ts77; 04-11-2007 at 08:01 AM..
Reason: addition
|

04-11-2007, 08:27 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
Quote:
|
So my first followup question is: Is this setup also supported?
|
Yes, you can do that. You should be able to do whatever you did with lighttpd with LSWS. 
Quote:
|
What would the users see if there were more than 150 concurrent connections? ... Are the pages just fetched slowly, or are the connections actually refused?
|
When the backlog of TCP server socket is not full, the pending connection will be held in the backlog, when the backlog was full, more connections will be refused. Linux's TCP backlog can hold upto 200 connections I believe.
|

04-11-2007, 04:46 PM
|
|
Senior Member
|
|
Join Date: Apr 2007
Posts: 114
|
|
|
yeah, the dns caching did worry me. It's probably not worth pursuing.
For my current setup, I compiled the php as fastcgi, and I also use it to run command-line php scripts. I assume that when I recompile php with the lsapi capability, I can still use it to run command line scripts?
By the way, the Solaris default TCP backlog is 128, but on the IBM websphere site, they are recommending set it to 8000 for their application, so apparently it is user-definable, and can be pretty long.
This is my offseason - If I install the standard version and run it for 2 - 3 months to evaluate the stability, how difficult is it to upgrade to the enterprise version when I get close to my active period? Does it roughly involve stopping the server, copying over a file or two, and restarting it?
|

04-11-2007, 04:55 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
Quote:
|
I assume that when I recompile php with the lsapi capability, I can still use it to run command line scripts?
|
Correct.
Quote:
|
how difficult is it to upgrade to the enterprise version when I get close to my active period? Does it roughly involve stopping the server, copying over a file or two, and restarting it?
|
Easier than that, just run installer and select upgrade, no downtime at all.
|

04-12-2007, 07:21 AM
|
|
Senior Member
|
|
Join Date: Apr 2007
Posts: 114
|
|
Hi, I'm just going to continue with this thread even though my questions are more technical in nature now.
I followed the instructions to build LSAPI into PHP, and I got this error with the buildconf --force:
Quote:
make -s -f build/build2.mk
make: Fatal error: Command failed for target `all'
|
If I just configure and build PHP after that and look at the phpinfo page, it does not say LSAPI anywhere. Should it? Is the failure above going to invalidate the new build?
Is it okay to leave it as a fastcgi build, or do I need to disable all the fastcgi settings?
here is my current configure ....
Quote:
./configure \
--prefix=/opt/csw \
--enable-versioning \
--with-layout=GNU \
--enable-memory-limit \
--enable-libxml \
--with-libxml-dir=/usr/local \
--enable-reflection \
--enable-spl \
--program-prefix="" \
--disable-cli \
--enable-force-cgi-redirect \
--enable-fastcgi \
--with-zlib \
--with-litespeed \
--with-regex=php \
--enable-mbstring \
--disable-json \
--disable-filter \
--without-sqlite \
--without-pdo-sqlite \
--with-mysql=/opt/csw/mysql5 \
--with-pdo-mysql=/opt/csw/mysql5
|
|

04-12-2007, 09:05 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
|
You need to install GNU m4/gmake/autoconf/gcc, make sure those tools is used instead of sun's.
You can try a different version as well.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 07:33 AM.
|
|