|
|

08-24-2006, 12:06 PM
|
|
New Member
|
|
Join Date: Aug 2006
Posts: 9
|
|
Quote:
Originally Posted by mistwang
Any chance to try it out? Any update?
|
Forgive me, but I totally forgot to post back here. I ended up briefly trying to get LSAPI and Capistrano to work nicely, and then went on a trip last week, and then have been busy trying to catch up at work so far this week.
I only played with this briefly, but what I did discover was that the Rails spawner script (which Capistrano ends up using) requires that a script to spawn new listeners is available. Apparently with a standard lighttpd configuration there is a spawn-fcgi script which is capable of creating new FastCGI listeners.
When I discovered this, I meant to ask here whether or not something like this existed for LSAPI, but (as noted above) I got a little sidetracked. :-)
Right now, I've got my configuration back using the Mongrel Cluster + Proxy + Load Balancer, and that is working well. There are hooks for the Rails spawner script to specify a different dispatcher script to use, so if something like spawn-fcgi is available (or if spawn-fcgi could be coxed into doing this job), I'd be more than happy to give it a shot.
--
DeLynn Berry
delynn@gmail.com
http://delynnberry.com
|

08-24-2006, 12:47 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
No problem. 
Actaully, LSAPI can be started exactly the same way by using a FCGI spawner.
However, we are thinking about a better solution by installing LSWS + ruby LSAPI on each node. As LSAPI processes are managed by LSWS directly, there is no need for spawner and spinner anymore, just let them do nothing or run "lswsctrl start" if LSWS can be started by a normal user (Not sure Capistrano can execute command as 'root' on a remote server or not?).
Only Reaper need to be changed to restart all ruby processes, I think a simple shell command "killall ruby" will do the trick (make sure ruby LSAPI 1.6 is installed). Or, just run "lswsctrl restart" if LSWS is started by a normal user.
We will release LSWS 2.2 soon, which features easy Rails configuration, should be easier than Mongrel, at least for a single server setup.
LSWS + Ruby LSAPI should give better performance on Dynamic pages as well as pages cached in file system than using Mongrel on each cluster node. I believe.
Any comments? Concerns?
Last edited by mistwang; 08-24-2006 at 12:49 PM..
|

08-24-2006, 01:07 PM
|
|
New Member
|
|
Join Date: Aug 2006
Posts: 9
|
|
Quote:
Originally Posted by mistwang
Actaully, LSAPI can be started exactly the same way by using a FCGI spawner.
|
I was wondering if that might not be the case. I just didn't get a chance to find/install/configure/etc the spawn-fcgi script.
Quote:
Originally Posted by mistwang
However, we are thinking about a better solution by installing LSWS + ruby LSAPI on each node. As LSAPI processes are managed by LSWS directly, there is no need for spawner and spinner anymore, just let them do nothing or run "lswsctrl start" if LSWS can be started by a normal user (Not sure Capistrano can execute command as 'root' on a remote server or not?).
Only Reaper need to be changed to restart all ruby processes, I think a simple shell command "killall ruby" will do the trick (make sure ruby LSAPI 1.6 is installed). Or, just run "lswsctrl restart" if LSWS is started by a normal user.
We will release LSWS 2.2 soon, which features easy Rails configuration, should be easier than Mongrel, at least for a single server setup.
LSWS + Ruby LSAPI should give better performance on Dynamic pages as well as pages cached in file system than using Mongrel on each cluster node. I believe.
Any comments? Concerns?
|
Capistrano does have the capability to execute commands as a sudo user, so talking to lswsctrl shouldn't be a problem.
I'm excited to see the new features in 2.2. It sounds like there is going to be some good Rails related additions to the platform (which I think is a very smart move for LSWS). That said, I'm pretty happy with the configuration that I have right now--especially considering I'm still pretty much in development/testing mode. I think what I'm going to do is keep things as they are right now and then play around again when 2.2 is released and re-evaluate things then. From the sounds of it though, I'll be moving to LSAPI soon!
Thanks for all your help and information!
--
DeLynn Berry
delynn@gmail.com
http://delynnberry.com
|

08-29-2006, 08:43 AM
|
|
New Member
|
|
Join Date: Aug 2006
Posts: 9
|
|
Just wanted to let you know that I was able to get everything (including Capistrano and it's maintenance page) working with the 2.2 release.
For reference all I had to do was create my own restart task in deploy.rb and have it call the following:
Code:
sudo "/usr/local/lsws/bin/lswsctrl restart"
Then in my Virtual Host I added the following rewrite rules to get the maintenance page to be served:
Code:
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]
I've discovered an odd permissions problem related to the application I'm running trying to create a cached page, but I figured I'd post the details on that in a new thread.
Keep up the great work guys!
--
DeLynn Berry
delynn@gmail.com
http://delynnberry.com
|

08-29-2006, 08:58 AM
|
|
New Member
|
|
Join Date: Aug 2006
Posts: 9
|
|
Quote:
Originally Posted by delynn
I've discovered an odd permissions problem related to the application I'm running trying to create a cached page, but I figured I'd post the details on that in a new thread.
|
Actually the permissions issue had to do with me not correctly setting group write access on the public directory, so my application wasn't able to writing out cache files. D'oh!
Everything is working great!
--
DeLynn Berry
delynn@gmail.com
http://delynnberry.com
|

08-29-2006, 09:41 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
|
That's great!
Thanks for you update! :-)
|
| 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 01:25 AM.
|
|