1 / 15

An Evaluation of Current Ruby on Rails Serving Approaches

An Evaluation of Current Ruby on Rails Serving Approaches. Jeremy Witmer CS 526 Spring 2008. Overview. Purpose Introduction Application Servers Reverse Proxies Procedure Benchmarking Results Conclusions Future Research. Purpose.

takara
Download Presentation

An Evaluation of Current Ruby on Rails Serving Approaches

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An Evaluation of Current Ruby on Rails Serving Approaches Jeremy Witmer CS 526 Spring 2008

  2. Overview • Purpose • Introduction • Application Servers • Reverse Proxies • Procedure • Benchmarking • Results • Conclusions • Future Research Ruby on Rails Application Serving CS526

  3. Purpose The purpose of this project is to survey the current best application servers for Ruby on Rails, and best methods for reverse proxy to a cluster of application servers. Ruby on Rails Application Serving CS526

  4. Introduction • What is Ruby? • Ruby is a dynamically typed object-oriented programming language with significant metaprogramming capabilities • What is JRuby? • JRuby is an implementation of Ruby that runs on the Java Virtual Machine (JVM) • What is Rails? • Rails is a web application development framework written Ruby, which uses the metaprogramming capabilities of Ruby to ease development effort. Ruby on Rails Application Serving CS526

  5. Rails Application Serving Ruby on Rails Application Serving CS526

  6. Application Servers • WEBrick • Mongrel • Thin Ruby on Rails Application Serving CS526

  7. Reverse Proxies • Apache 2 • nginx • Pound • Swiftiply • Glassfish Ruby on Rails Application Serving CS526

  8. Procedure 1. Set up a basic Rails application (used gullery) 2. Run a single instance of each application server and benchmark the throughput 3. For each of the reverse proxy options: 1. Set up the reverse proxy to dispatch to the cluster 2. Run a cluster of 3 Mongrels, first on Ruby, then on JRuby 3. Run the benchmarks to measure cluster throughput 4. Set up gullery application to run on Glassfish under JRuby and run the same benchmarks Ruby on Rails Application Serving CS526

  9. Benchmarking • All benchmarks performed using RubyWebBench • RWB allows scripting requests and weighting among URLs in the application • Each cluster setup was tested 3 times with 1000 requests urls.add_url(20, "http://localhost:3500") urls.add_url(40, "http://localhost:3500/projects/show/1") urls.add_url(40, "http://localhost:3500/projects/show/1") Ruby on Rails Application Serving CS526

  10. Results Application Servers, 1000 Request Benchmark Ruby on Rails Application Serving CS526

  11. Results Reverse Proxies to Clusters, 1000 Request Benchmark Ruby on Rails Application Serving CS526

  12. Conclusions • Use GlassFish • Use Thin on native Ruby, with Apache2 • Ruby and JRuby are pretty close in terms of performance • JRuby takes longer to start, but does better in terms of memory and processor usage • JRuby doesn’t have a user-space threading problem Ruby on Rails Application Serving CS526

  13. Future Work • Benchmark modrails as an application server/proxy • Benchmark haProxy for reverse proxying • Compare results to hardware reverse proxy/load balancers Ruby on Rails Application Serving CS526

  14. Wiki, Files, and Scripts • Wiki is at cs.uccs.edu/~jtwitmer/cs526/Project/ • Project report • Setup instructions for Rails application • Setup Instructions for all application servers and proxies • Wiki generated with Instiki: rubyforge.org/projects/instiki/ • Files at cs.uccs.edu/~jtwitmer/cs526/Project/FilesAndScripts.html Ruby on Rails Application Serving CS526

  15. References • Ruby: ruby-lang.org • JRuby: jruby.codehaus.org • RubyWebBench: http://rubyforge.org/projects/rwb/ • Ruby on Rails: rubyonrails.com • Mongrel: mongrel.rubyforge.org • Thin: code.macournoyer.com/thin/ • Apache2: apache.org • nginx: nginx.net • Pound: www.apsis.ch/pound/ • Swiftiply: swiftiply.swiftcore.org/ • GlassFish: wiki.jruby.org/wiki/JRuby_on_Rails_in_GlassFish Ruby on Rails Application Serving CS526

More Related