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

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > best option to run RoR?

Reply
 
Thread Tools Display Modes
  #1  
Old 08-29-2006, 08:14 AM
dlhhyct dlhhyct is offline
Member
 
Join Date: Aug 2006
Posts: 41
Default best option to run RoR?

Currently I'm running litespeed in front of mongrel processes, and it works great.

Today I just read about the new LiteSpeed RubyRunner (LSRR) and I'm getting confused. which of the 5 options yield the maximum performance? wait, minus fastCGI (too hard for me) and CGI. which of following 3 options yield max performance for a RoR site?

Ruby LSAPI,
LiteSpeed RubyRunner (LSRR),
Mongrel

http://www.litespeedtech.com/support...uby_rails_easy
Reply With Quote
  #2  
Old 08-29-2006, 11:55 PM
andreas andreas is offline
Senior Member
 
Join Date: Aug 2006
Posts: 91
LSRR uses LSAPI internally. Both options will be faster than Mongrel and use less memory.
Reply With Quote
  #3  
Old 08-30-2006, 06:32 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
Ruby LSAPI is the best choice for RoR. It gives the best performance as well the easiest configuration, the wiki uses Ruby LSAPI.
LSRR is for running CGI in a persistent interpreter, ruby interpreter need to do extra work to shield one CGI script from interfering with the others, better using Ruby LSAPI directly when you can.
Reply With Quote
  #4  
Old 08-30-2006, 07:49 AM
dlhhyct dlhhyct is offline
Member
 
Join Date: Aug 2006
Posts: 41
Default more questions

thanks for the info, and i have more questions.

To reload a RoR app, currently i use capistrano to restart mongrel processes, very simple, and it won't affect other vhost. how is it done using LSAPI, disable/enable vhost, or restart whole webserver?

under which scenario would one use LSRR instead of LSAPI? I mean what LSRR attempt to accomplish that LSAPI can't do?

for my typical RoR app, I create a vhost to load balance a few mongrel processes, all in one server. If traffic grows, I think I can still use one LS vhost to load balance more mongrel processes on several servers, correct? how is scalability done using LSAPI cross several servers?
Reply With Quote
  #5  
Old 08-30-2006, 08:08 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
Quote:
To reload a RoR app, currently i use capistrano to restart mongrel processes, very simple, and it won't affect other vhost. how is it done using LSAPI, disable/enable vhost, or restart whole webserver?
For LSWS + Ruby LSAPI, just restart LSWS, restart is graceful, no downtime at all.

Quote:
under which scenario would one use LSRR instead of LSAPI? I mean what LSRR attempt to accomplish that LSAPI can't do?
LSRR is implemented on top of LSAPI, it is for running plain CGI scripts written in Ruby.

Quote:
If traffic grows, I think I can still use one LS vhost to load balance more mongrel processes on several servers, correct? how is scalability done using LSAPI cross several servers?


Yes, you can do that. In that case, I would recommend running LSWS + LSAPI on each every cluster node with a front-end load balancer. It should be easier to setup than running LSAPI on a node along, faster than using Mongrel, and pages cached in file system on a node can served by LSWS directly.

For how to use capistrano together with LSWS + LSAPI in a cluster, please read the discussion in
http://www.litespeedtech.com/support/forum/showthread.php?t=522&page=2

Last edited by mistwang; 08-30-2006 at 08:28 AM..
Reply With Quote
  #6  
Old 08-30-2006, 08:33 AM
dlhhyct dlhhyct is offline
Member
 
Join Date: Aug 2006
Posts: 41
Default superb

thanks for all the info.

just one last question, what load balance proxy hardware/software do you recommend?
Reply With Quote
  #7  
Old 08-30-2006, 08:48 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
You can LSWS as stateless load balancer as what you did with Mongrel cluster. We will release a dedicate load balancer which is session-aware. You can also use any other load balance proxies like apache, pond, etc., as long as it fits what your need.
Reply With Quote
  #8  
Old 08-31-2006, 08:35 PM
dlhhyct dlhhyct is offline
Member
 
Join Date: Aug 2006
Posts: 41
Default command to graceful restart lsws?

what's the equivalent of graceful restart in a command? /etc/init.d/lsws restart ? so i can write a rake task.

from my simple benchmark, ruby lsapi give 3x performance of mongrel. good job well done.
Reply With Quote
  #9  
Old 08-31-2006, 09:30 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
Quote:
what's the equivalent of graceful restart in a command? /etc/init.d/lsws restart ? so i can write a rake task.
Yes, that should work. Or use "lsws/bin/lswsctrl restart".

Quote:
from my simple benchmark, ruby lsapi give 3x performance of mongrel. good job well done.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
new Apache coexistence option jbw Feedback/Feature Requests 8 08-16-2006 07:24 PM


All times are GMT -7. The time now is 03:14 AM.



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