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

Go Back   LiteSpeed Support Forums > External Applications > CGI/Perl/Python > Tutorial in installing LiteSpeed with FastCGI and Catalyst

Reply
 
Thread Tools Display Modes
  #1  
Old 07-15-2006, 12:58 PM
Conundrum Conundrum is offline
New Member
 
Join Date: Jul 2006
Posts: 4
Default Tutorial in installing LiteSpeed with FastCGI and Catalyst

In case anyone is interested I put together a doc on getting LiteSpeed up and running with the Catalyst framework:

Installing LiteSpeed and FastCGI for Catalyst
Reply With Quote
  #2  
Old 07-15-2006, 05:45 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Hi Conundrum,

Thank you for the tutorial. A few comments:

1) Initial Request Timeout is too short, should be set to something like "60", otherwise, litespeed may think the request has been failed for a request that needs more than 1 seconds to process.
2) Instead of starting the FastCGI server manually, you can have LiteSpeed start it automatically. Set "instances" to match "Max Connections", no need for those command line options.
3) LiteSpeed does support Load Balancing, to do that, you need to define multiple FastCGI app, and one "Load balancer" app.
Reply With Quote
  #3  
Old 07-15-2006, 09:27 PM
Conundrum Conundrum is offline
New Member
 
Join Date: Jul 2006
Posts: 4
Thanks for the reply. I've updated the page to change Initial Request Timeout and mention LiteSpeed has built-in load balancing support. I'll try the load balancing soon but just mentioned it is available for now.

Regarding having LiteSpeed automatically start the requested number of FastCGI servers, my understanding is other frameworks like Rails typically have one FastCGI process per external server. For Catalyst, each external server is a FCGI::ProcManager process managing a specified number of FastCGI servers. Is there a preferred way to set up LiteSpeed in this scenario?
Reply With Quote
  #4  
Old 07-16-2006, 07:35 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
It is preferred to let LiteSpeed start FCGI applications no matter which Process Manager is used. I personally prefer LiteSpeed's built-in process manager. It is more intelligent, and have the following advantages
1) On-demand dynamic spawning, uses system resource more efficiently.
2) Fault tolerance. Some FastCGI app is not very reliable and may stop working after running for a while, LiteSpeed can start a new group of processes automatically, most FCGI built-in proc manager cannot do that.
3) Simple and easy, you don't need to worry about starting the app manually.

Even when an application's internal process manager is prefered, you can still let LiteSpeed start the parent process automatically, in that case, just set "instances" to "1", and set the command line parameter '-n' to match "Max Connections" and get rid of "-d" option.
Reply With Quote
  #5  
Old 07-17-2006, 12:48 AM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
Conondrum,

The world need more indepth how-tos. =) Is it okay with you if we import your how-to into our wiki? We will obviously link to your/original site with proper credits given.

One problem I see is the line "LiteSpeed's Persistent FastCGI connection, which is known to have problems with Ruby, also was not tested."

The problem is not with LiteSpeed but rather with Ruby's FastCGI implementation. LiteSpeed supports persistent connections to FastCGI but Ruby's FCGI does not support this. Thus you have to disable "Persistent Connection" when using Ruby with via LiteSpeed FCGI config. This is one of the reasons LiteSpeed developed LSAPI for Ruby after conversations with developers at TextDrive which are heavy users of everything Ruby/Rails. Instead of relying on 3rd party maintainers to upgrade the Ruby's FCGI module, might as well create a best of breed SAPI for LiteSpeed and Ruby minus the short-comings of Ruby FCGI.
Reply With Quote
  #6  
Old 07-18-2006, 07:04 AM
Conundrum Conundrum is offline
New Member
 
Join Date: Jul 2006
Posts: 4
Quote:
Originally Posted by xing
The world need more indepth how-tos. =) Is it okay with you if we import your how-to into our wiki? We will obviously link to your/original site with proper credits given.
No problems on importing it into the LiteSpeed wiki. I agree more how-tos are better.

Quote:
Originally Posted by xing
The problem is not with LiteSpeed but rather with Ruby's FastCGI implementation. LiteSpeed supports persistent connections to FastCGI but Ruby's FCGI does not support this. Thus you have to disable "Persistent Connection" when using Ruby with via LiteSpeed FCGI config. This is one of the reasons LiteSpeed developed LSAPI for Ruby after conversations with developers at TextDrive which are heavy users of everything Ruby/Rails. Instead of relying on 3rd party maintainers to upgrade the Ruby's FCGI module, might as well create a best of breed SAPI for LiteSpeed and Ruby minus the short-comings of Ruby FCGI.
Thanks for the update. Good to know.

Last edited by Conundrum; 07-18-2006 at 07:20 AM..
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 04:07 AM.



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