« Return to Thread: JRuby on Rails - Deployment Options

Re: JRuby on Rails - Deployment Options

by Joseph Athman :: Rate this Message:

Reply to Author | View in Thread

I think you should try to go with the most simple solution you can that will handle the load your site has.  There's no sense in making a load balanced clustered server environment with Apache/Nginx and app servers if you have 10 users.  All it does is add complication without any perceivable benefit.  We have been using the glassfish gem and it works great.  Dead simple and handles a nice load as well.  If you are using a new version of Rails and can turn on multithreaded mode you will get some nice throughput without as big of a memory footprint.

Joe

On Sun, Jun 21, 2009 at 10:36 AM, Frederic Jean <fred@...> wrote:
Matthew Winter wrote:
Hi,

I was wondering if anyone has done some tests with regards to different deployment options for JRuby on Rails.

Ideally open source deployment options. So far I have come up with the following, different combinations:

  • Jetty
  • Glassfish
  • JBoss
  • Apache + Tomcat
  • Apache + Jetty
  • Nginx + Tomcat
  • Nginx + Jetty

I am sure there are a lot more options available.

What do people currently have running in production and how have you found the deployment option with regards to performance and memory utilisation.

I have read various blog posts on the subject, but most seem to concentrate on how easy the deployment option is rather than how effective a solution it is.

For example, would it still be beneficial to place a HTTP server such as Apache, Nginx, etc in front of the Java servlet container, much like a standard RoR deployment option. Reading the Jetty, Glassfish and JBoss sites seem to suggest that you do not have to do this, and you will still be able to achieve the same or at least similar levels of performance, but I would have thought that it would still have been beneficial to place static objects behind a HTTP server, and then share the JRoR load across multiple Java servlet containers, so handling concurrency more effectively.

Hi Matthew,

I think that you are on the right path with having a static HTTP server fronting your application servers. Both Apache and nginx will do a great job of serving the static content and load balancing between the servlet container running your applications. The servlet containers can certainly serve static content, but they are not as effecient as Apache or nginx at doing so. My preference is to reserve application severs (whether servlet containers, Mongrels or FastCGI processes) to generate dynamic content.

We currently use Apache HTTPD to front our application servers on Project Kenai. We are still using Glassfish V2 to run our web application (a JRuby on Rails app). It works well enough for us.

I have used nginx to front another Rails application. I prefer the nginx configuration file syntax to the Apache HTTPD one.

I hope that this helps.

Fred



Any help, information on this would be most appreciated.

Regards
Matthew Winter


 « Return to Thread: JRuby on Rails - Deployment Options