Deploying Ruby on Rails How to make your application actually serve Dan Buettner 18 Oct 2007.

Slides:



Advertisements
Similar presentations
MQ Series Cross Platform Dominant Messaging sw – 70% of market Messaging API same on all platforms Guaranteed one-time delivery Two-Phase Commit Wide EAI.
Advertisements

Web Server Hardware and Software
An Evaluation of Current Ruby on Rails Serving Approaches Jeremy Witmer CS 526 Spring 2008.
Creating WordPress Websites. Creating a site on your computer Local server Local WordPress installation Setting Up Dreamweaver.
27-Jun-15 Rails. What is Rails? Rails is a framework for building web applications This involves: Getting information from the user (client), using HTML.
PHP Scripting Language. Introduction “PHP” is an acronym for “PHP: Hypertext Preprocessor.” It is an interpreted, server-side scripting language. Originally.
Server Roles and Features.NET Framework 3.51.NET Framework 4.5 IIS Web Server IIS Default Document IIS Directory Browsing IIS HTTP Errors.
IST346:  Web Services. Today’s Agenda  Learn the basics of how the Web works  Understand various web service architectures  Address scaling, security,
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
Ruby on Rails (Slides modified by ements-2ed.shtml)
SYST Web Technologies SYST Web Technologies Installing a Web Server (XAMPP)
22-Aug-15 | 1 |1 | Help! I need more servers! What do I do? Scaling a PHP application.
RUBY ON RAILS It’s so rad. What we’ll cover  What is Ruby?  What is RoR?  Why RoR?  Developing with RoR  Deployment  Demo  Questions.
Web Server Configuration Alokes Chattopadhyay Computer & Informatics Centre IIT Kharagpur.
Apache Tomcat Web Server SNU OOPSLA Lab. October 2005.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Rails and Grails. To get started Make sure you have java installed You can get the sdk and jre at:
Basics of the HTTP Protocol and Apache Web Server Brandon Checketts.
Getting to Push Button Deploys Moovweb January 19, 2012.
Deploying on Windows (it’s actually possible!) Brian Hogan New Auburn Personal Computer Services LLC Contents copyright © 2007 Brian P. Hogan. Do not reproduce.
DTS Web Hosting, Rates And Services Web Hosting Internet Services Unit May 2006.
Slow Web Site Problem Analysis Last Update Copyright 2013 Kenneth M. Chipps Ph.D. 1.
Software Licensing, Made Simple SELECT Server XM Edition
SSC2: Web Services. Web Services Web Services offer interoperability using the web Web Services provide information on the operations they can perform.
L. Grewe LAMP, WAMP and... Motivaiton Basic Web Systems with Delivery of Static and Dynamic Web Pages html, css, media javascript (“dynamic” on client.
Ruby on Rails & Windows sriramkrishnan.com.
Application Servers: Tomcat. What is an application server? Servlets are Java’s answer to server-side programming. Servlets are a special type of Java.
Best Western Green Bay CHEMS 2013 SYSTEM ARCHITECTURE.
Node.js - What is Node.js? -
Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess AFNOG 11 Kigali, Rwanda May 2010 Dorcas Muthoni Courtesy: Hervey Allen.
Presentation On Apache BSIT 6th1 Apache server Building Your Very Own Web Server.
Ruby on Rails (Slides modified by ements-2ed.shtml)
1 Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess AFNOG X Cairo, Egypt May 2009 Hervey Allen.
Ruby on Rails on Ubuntu Bradley Taylor Rails Machine, LLC
1 Session 1: Introduction to PHP & MySQL iNET Academy Open Source Web Development.
General rules 1. Rule: 2. Rule: 3. Rule: 10. Rule: Ask questions ……………………. 11. Rule: I do not know your skill. If I tell you things you know, please stop.
 Load balancing is the process of distributing a workload evenly throughout a group or cluster of computers to maximize throughput.  This means that.
Dean Anderson Polk County, Oregon GIS in Action 2014 Modifying Open Source Software (A Case Study)
Apache HTTP Server from 10,000 feet An open source Apache feature overview and discussion.
Philip Repsher October 29 th, 2008 Or Maybe November 3 rd, 2008.
Cloud Computing Computer Science Innovations, LLC.
Introduction TO Network Administration
NJIT 1 Apache Tomcat (Version 6.0) THETOPPERSWAY.COM.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
Fronting Tomcat With Apache V0.1 – Nguyễn Bá Thành Software Manager, Game Platform & Integration.
BZUPAGES.COM WEB SERVER PRESENTED TO: SIR AHMAD KAREEM.
I NTRODUCTION TO N ETWORK A DMINISTRATION. W HAT IS A N ETWORK ? A network is a group of computers connected to each other to share information. Networks.
Your EC2 Instance. How to Connect to your EC2 Instance?
Module 1: Designing IIS Web Farms Changes in a Nutshell shell-shared-hosting-improvements-on-iis7.aspx.
XAMPP.
Speeding Up Alfresco and Share using Nginx Reverse/Caching Frontend Proxy Ishara Fernando Senior Linux Systems Administrator.
Galaxy in Production Nate Coraor Galaxy Team Penn State University.
Apache Configuration. Application Install IBM HTTP Server is Apache.
NWCLUG 04/06/2010 Jared Moore L A M P.
Understanding and Improving Server Performance
Understanding Solutions
Node.Js Server Side Javascript
Apache web server Quick overview.
StackStorm: DevOps to ChatOps
Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess
Lab A: Installing and Configuring the Network Load Balancing Driver
An Evaluation of Current Ruby on Rails Serving Approaches
PHP / MySQL Introduction
LAMP, WAMP and.. L. Grewe.
CompTIA Server+ Certification (Exam SK0-004)
Node.Js Server Side Javascript
Apache Tomcat Web Server
Module P3 Practical: Building a webapp in nodejs and
Introduction to PHP.
Web Servers (IIS and Apache)
Presentation transcript:

Deploying Ruby on Rails How to make your application actually serve Dan Buettner 18 Oct 2007

Rails includes WEBrick to get you started WEBrick is: easy, reliable, slow WEBrick is not: threaded, scalable, fast If you’re doing something very, very simple, a single WEBrick might work well for you to deploy with Starters

But … How many of you will have the luxury of deploying something very very simple?

Something more realistic Most common setup: "regular" HTTP server frontend for static content load-balancing to other processes that do Rails Why: load - HTTP servers serve static content FAST software built to serve Rails can serve static too, but: - not as fast - not as many nifty features

Pieces and Parts Apache Lighttpd nginx WEBrick pound Mongrel FastCGI IIS (no, really!)

Common model of RoR application deployment Mongrel 5000 Mongrel 5001 Mongrel 5002 Mongrel 5003 Mongrel 5004 Mongrel 5005 Pack of Mongrels (Rails) Client Apache Server (static)

Details # We are using rewrites to pass to the proxy BalancerMember BalancerMember BalancerMember BalancerMember BalancerMember BalancerMember BalancerMember BalancerMember RewriteEngine On # if request is not a file on the filesystem, send to the proxy RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://prod_app%{REQUEST_URI} [P,QSA,L] Example Apache 2.2 config with 8 mongrels serving a production app

More Details How to install Mongrel: download and install RubyGems, at command line (UNIX/Linux/Mac OS X/Win32): gem install mongrel How to install Mongrel cluster or service: download and install RubyGems, at command line (UNIX/Linux/Mac OS X): gem install mongrel_cluster Win32*: gem install mongrel_service *Mongrel cluster supposedly works on Windows, but I haven’t been able to make it happen

Cluster Information Mongrel cluster configuration is covered in detail in docs on the Web; configuration specifics vary widely depending on your platform’s notion of ‘services’.

Hacking together a pack of mongrels on Windows Cluster on Windows seems hit-or-miss Instead, install independent mongrels as services Then load balance from Apache as if you had a cluster mongrel_rails service::install -N RTCTracker4000 -c C:\web\rtc_tracker -p e production. mongrel_rails service::install -N RTCTracker4009 -c C:\web\rtc_tracker -p e production

More Windows hacks Mongrel clusters have nifty cluster start, stop and restart commands on Unixes. If you’re rolling your own on Windows, build it off echo Stopping Apache2.2 service net stop Apache2.2 echo Stopping RTCTracker4xxx mongrel services... net stop RTCTracker net stop RTCTracker4009 echo Starting RTCTracker4xxx mongrel services... net start RTCTracker net start RTCTracker4009 echo Starting Apache2.2 service... net start Apache2.2 echo Waking up the database connections rem this is a cheap hack C:\apache\bin\ab.exe -n 200 -c 10 " echo All done.

Resources Rails: RubyGems: Apache: Mongrel: nginx: Lighttpd: pound: FastCGI: Rails Wiki on deployment: An interesting approach to an always-on site with Apache & Mongrel: