Rails 5. web CGI. okkez Ruby. Apache. lighttpd. WEBrick. Mongrel. Thin. Rails. Virtual Host



Similar documents
Rails Application Deployment. July Philly on Rails

Technical specification

Installing Rails 2.3 Under CentOS/RHEL 5 and Apache 2.2

Installing Rails 2.3 Under Windows XP and Apache 2.2

Apache HTTP Server. Load-Balancing with Apache HTTPD 2.2 and later. Erik Abele

The course will be run on a Linux platform, but it is suitable for all UNIX based deployments.

Painless Web Proxying with Apache mod_proxy

DEPLOYMENT GUIDE Version 1.0. Deploying the BIG-IP LTM with Apache Tomcat and Apache HTTP Server

Apache & Virtual Hosts & mod_rewrite

White Paper DEPLOYING WDK APPLICATIONS ON WEBLOGIC AND APACHE WEBSERVER CLUSTER CONFIGURED FOR HIGH AVAILABILITY AND LOAD BALANCE

Installing Apache Software

Apache 2.2 and mod_proxy_balancer

WebBridge LR Integration Guide

Implementing HTTPS in CONTENTdm 6 September 5, 2012

Web Server: Principles and Configuration Web Programming 8) Web Server

Acronis Backup Cloud APS 2.0 Deployment Guide

DEPLOYMENT GUIDE Version 1.0. Deploying the BIG-IP LTM with Apache Tomcat and Apache HTTP Server

Installing an SSL certificate on the InfoVaultz Cloud Appliance

Apache 2 mod_ssl by example

Basic Apache Web Services

Deploying and Monitoring Ruby on Rails A practical guide

xcp Application Deployment On Tomcat Cluster

C:\www\apache2214\conf\httpd.conf Freitag, 16. Dezember :50

Cookbook Secure Failover for Tomcat Application Server Use Apache, mod_proxy, mod_security, mod_ssl to offer secure application delivery

Release Notes Date: September 2013

Redmine Installation on Debian. v1.1

How to setup HTTP & HTTPS Load balancer for Mediator

Apache web server magic on IBM i. Alan Seiden Consulting alanseiden.com

ZEN NETWORKS 3300 PERFORMANCE BENCHMARK SOFINTEL IT ENGINEERING, S.L.

TODAY web servers become more and more

PROXY SETUP WITH IIS USING URL REWRITE, APPLICATION REQUEST ROUTING AND WEB FARM FRAMEWORK OR APACHE HTTP SERVER FOR EMC DOCUMENTUM EROOM

Secure configuration of NFS on Windows 2008 Server for WebDocs iseries

Apache and Virtual Hosts Exercises

ZVA64EE PERFORMANCE BENCHMARK SOFINTEL IT ENGINEERING, S.L.

CTIS486 Midterm Solution 23/07/ Akgül

Apache httpd v2.4: Reverse Proxy. (The Hidden Gem) Jim Jagielski

The only skill required really is to locate and edit text-files with a text-editor like Notepad.

Accelerating Rails with

Setting Up B2B Data Exchange for High Availability in an Active/Active Configuration

1. Introduction 2. Getting Started 3. Scenario 1 - Non-Replicated Cluster 4. Scenario 2 - Replicated Cluster 5. Conclusion

Step-by-Step guide to setup an IBM WebSphere Portal and IBM Web Content Manager V8.5 Cluster From Zero to Hero (Part 2.)

Configure Wildcard-Based Subdomains

The mod_proxy Cookbook

Oracle9i Application Server: Options for Running Active Server Pages. An Oracle White Paper July 2001

HP ALM. Software Version: External Authentication Configuration Guide

High Availability Configuration of ActiveVOS Central with Apache Load Balancer

Creating X.509 Certificates With OpenSSL

Created by : Ashish Shah, J.M. PATEL COLLEGE UNIT-5 CHAP-1 CONFIGURING WEB SERVER

Ultimate htaccess Article

Enterprise Knowledge Platform

How to Make the Client IP Address Available to the Back-end Server

ANECDOTAL DEVELOPMENT & DEPLOYMENT. A Case-Study in PHP Project Workflow Lone Star PHP - June 2011 Brian Blood

By PANKAJ SHARMA. Concepts of Server Load Balancing

Network Monitoring Lab

EQUELLA. Clustering Configuration Guide. Version 6.2

Running Multiple Shibboleth IdP Instances on a Single Host

Securing Splunk with Single Sign On & SAML

Shibboleth SP Simple Installation Guide For LINUX

Real Vision Software, Inc.

Configuring Ubuntu Server as a Firewall and Reverse Proxy for OWA 2007 Configuration Guide

Host your websites. The process to host a single website is different from having multiple sites.

CC ICT-SUD. Setting up and integrate Apache, MySQL and PHP on a Linux system

Drupal CMS for marketing sites

CentraSite SSO with Trusted Reverse Proxy

Integrate Rails into an Existing IIS Web infrastructure using Mongrel

How-to-Guide: Apache as Reverse Proxy for Fiori Applications

Content. Global Delivery Network: Folders

N Things You Didn t Know You Could Do With Apache

How To Use Ngnix (Php) With A Php-Fpm (Php-Fmm) On A Web Server (Php5) On Your Web Browser) On An Ubuntu Web Server On A Raspberry Web 2.5 (Net

Virtual Host Continue

Setting up an Apache Web Server for Greenstone 2 Walkthrough

Stress Testing for Performance Tuning. Stress Testing for Performance Tuning

Running Nginx as Reverse Proxy server

CIA Lab Assignment: Web Servers

Application Gateway with Apache

How-to-Guide: Reverse Proxy and Load Balancing for SAP Mobile Platform 3.X

ViMP 3.0. SSL Configuration in Apache 2.2. Author: ViMP GmbH

SITEMINDER SSO FOR EMC DOCUMENTUM REST

Contents of the document

Enterprise Knowledge Platform 5.6

HP Business Service Management

TYPO3 Security. Jochen Weiland CertiFUNcation 2016

LECTURE 6 NETWORK SERVICES PART2: WEB SERVICE

Apache Performance Tuning

High Availability Low Dollar Load Balancing

Apache 2.2 on Windows: A Primer

Nginx 1 Web Server Implementation

An Esri White Paper January 2010 Performance and Throughput Tips for ArcGIS Server Cached Map Services and the Apache HTTP Server

Implementing a Weblogic Architecture with High Availability

Transcription:

Rails 5 okkez Ruby 2008 05 17 web Apache lighttpd WEBrick Mongrel Thin CGI Rails Virtual Host <VirtualHost *> ServerName cgi.localhost Options ExecCGI FollowSymLinks ErrorLog /var/log/apache2/qa_cgi-error.log CustomLog /var/log/apache2/qa_cgi-access.log combined DocumentRoot /home/xxx/ruby/temp/qa_cgi/public <Directory /home/xxx/ruby/temp/qa_cgi/public> AllowOverride All Order deny,allow Allow from All </Directory> </VirtualHost> 1

.htaccess CGI RAILS ROOT/config/environment.rb Virtual Host RAILS ROOT/public/.htaccess RewriteBase FastCGI Vritual Host <IfModule mod_fcgid.c> IdleTimeout 3600 ProcessLifeTime 7200 MaxProcessCount 8 DefaultMaxClassProcessCount 2 DefaultInitEnv RAILS_ENV production IPCConnectTimeout 20 IPCCommTimeout 300 </IfModule> <VirtualHost *> ServerName fcgi.localhost Options ExecCGI FollowSymLinks ErrorLog /var/log/apache2/qa_fcgi-error.log CustomLog /var/log/apache2/qa_fcgi-access.log combined DocumentRoot /home/xxx/ruby/temp/qa_fcgi/public <Directory /home/xxx/ruby/temp/qa_fcgi/public> AllowOverride All Order deny,allow Allow from All </Directory> </VirtualHost>.htaccess mod fcgid Virtual Host RAILS ROOT/public/.htaccess RewriteBase 2

mod ruby Virtual Host RubySafeLevel 0 <VirtualHost *> ServerName ruby.localhost RubyRequire apache/ruby-run <Files *.rb> SetHandler ruby-object RubyHandler Apache::RubyRun.instance </Files> ErrorLog /var/log/apache2/qa_ruby-error.log CustomLog /var/log/apache2/qa_ruby-access.log combined DocumentRoot /home/xxx/ruby/temp/qa_mod_ruby/public <Directory /home/xxx/ruby/temp/qa_mod_ruby/public> AllowOverride All Order deny,allow Allow from All </Directory> </VirtualHost>.htaccess dispatch.rb dispatch.rb ADDITIONAL_LOAD_PATHS.reverse.each... Virtual Host RAILS ROOT/public/.htaccess RewriteBase Passenger (a.k.a mod rails) 3

Virtual Host <VirtualHost *> ServerName rails.localhost DocumentRoot /var/www/qa_mod_rails/public <Directory /var/www/qa_mod_rails/public > Options FollowSymlinks AllowOverride None Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/qa_mod_rails-error.log CustomLog /var/log/apache2/qa_mod_rails-access.log combined RailsEnv production RailsMaxPoolSize 2 RailsPoolIdleTime 600 </VirtualHost> /var/www Virtual Host mongrel cluster + mod proxy balancer <VirtualHost *> ServerName cluster.localhost Options ExecCGI FollowSymLinks ErrorLog /var/log/apache2/qa_cluster-error.log CustomLog /var/log/apache2/qa_cluster-access.log combined ProxyRequests Off <Proxy balancer://mongrel_cluster> BalancerMember http://127.0.0.1:8000 loadfactor=10 BalancerMember http://127.0.0.1:8001 loadfactor=10 BalancerMember http://127.0.0.1:8002 loadfactor=10 BalancerMember http://127.0.0.1:8003 loadfactor=10 BalancerMember http://127.0.0.1:8004 loadfactor=10 4

</Proxy> # These directories should always be served up by Apache, # since they contain static content. Or just let rails do it. ProxyPass /images! ProxyPass /stylesheets! ProxyPass /javascripts! ProxyPass /favicon.ico! ProxyPass / balancer://mongrel_cluster lbmethod=byrequests ProxyPassReverse / balancer://mongrel_cluster DocumentRoot /home/xxx/ruby/temp/qa_mongrel/public <Directory /home/xxx/ruby/temp/qa_mongrel/public> AllowOverride All Order deny,allow Allow from All </Directory> RewriteEngine On # Important rule to prevent exposure of subversion files # if you are deploying with Capistrano! RewriteRule ^(.*/)?.svn/ - [F,L] # Rewrite index to check for static RewriteRule ^/$ /index.html [QSA] # Rewrite to check for Rails cached page RewriteRule ^([^.]+)$ $1.html [QSA] # Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}!-f RewriteRule ^/(.*)$ balancer://mongrel_cluster%{request_uri} [P,QSA,L] </VirtualHost> mod proxy <IfModule mod_proxy.c> #turning ProxyRequests on and allowing proxying from all may allow #spammers to use your proxy to send email. 5

ProxyRequests Off <Proxy *> AddDefaultCharset off #Order deny,allow #Deny from all #Allow from.example.com Order allow,deny Allow from all </Proxy> # Enable/disable the handling of HTTP/1.1 "Via:" headers. # ("Full" adds the server version; "Block" removes all outgoing Via: headers) # Set to one of: Off On Full Block ProxyVia On </IfModule> mod proxy http % ab -n 1000 -c 10 http://rails.localhost CGI Server Software: Apache/2.2.8 Server Hostname: cgi.localhost Server Port: 80 Time taken for tests: 2704.89406 seconds Total transferred: 24117000 bytes Requests per second: 0.37 [#/sec] (mean) Time per request: 27040.894 [ms] (mean) 6

Time per request: 2704.089 [ms] (mean, across all concurrent requests) 8.71 [Kbytes/sec] received Connect: 0 0 2.9 0 31 Processing: 12516 27017 508.6 26991 27939 Waiting: 12487 26655 497.6 26628 27620 Total: 12516 27018 508.4 26991 27939 50% 26991 66% 27061 75% 27114 80% 27163 90% 27291 95% 27455 98% 27624 99% 27686 100% 27939 (longest request) FCGI Server Software: Apache/2.2.8 Server Hostname: fcgi.localhost Server Port: 80 Time taken for tests: 152.882008 seconds Failed requests: 16 (Connect: 0, Length: 16, Exceptions: 0) Non-2xx responses: 16 Total transferred: 23742984 bytes HTML transferred: 23222064 bytes Requests per second: 6.54 [#/sec] (mean) Time per request: 1528.820 [ms] (mean) Time per request: 152.882 [ms] (mean, across all concurrent requests) 151.66 [Kbytes/sec] received 7

Connect: 0 0 2.6 0 27 Processing: 191 1508 8098.0 249 64522 Waiting: 191 1508 8098.0 249 64522 Total: 191 1508 8098.7 249 64522 50% 249 66% 255 75% 267 80% 637 90% 819 95% 1214 98% 7424 99% 64031 100% 64522 (longest request) mod ruby Server Software: Apache/2.2.8 Server Hostname: ruby.localhost Server Port: 80 Time taken for tests: 203.246801 seconds Total transferred: 24117000 bytes Requests per second: 4.92 [#/sec] (mean) Time per request: 2032.468 [ms] (mean) Time per request: 203.247 [ms] (mean, across all concurrent requests) 115.87 [Kbytes/sec] received Connect: 0 0 3.0 0 32 8

Processing: 449 2026 3656.3 1301 32864 Waiting: 401 1975 3656.8 1268 32863 Total: 449 2026 3658.2 1301 32864 50% 1301 66% 1320 75% 1359 80% 1532 90% 3284 95% 3434 98% 3948 99% 26825 100% 32864 (longest request) webrick Server Software: WEBrick/1.3.1 Server Hostname: localhost Server Port: 3000 Time taken for tests: 158.277767 seconds Total transferred: 24065000 bytes Requests per second: 6.32 [#/sec] (mean) Time per request: 1582.778 [ms] (mean) Time per request: 158.278 [ms] (mean, across all concurrent requests) 148.47 [Kbytes/sec] received Connect: 0 0 0.6 0 8 Processing: 276 1575 336.4 1518 3244 Waiting: 257 1552 336.2 1496 3224 Total: 276 1575 336.4 1518 3244 9

50% 1518 66% 1531 75% 1686 80% 1711 90% 1759 95% 1790 98% 2793 99% 2989 100% 3244 (longest request) mongrel Server Software: Mongrel Server Hostname: localhost Server Port: 3000 Time taken for tests: 163.933646 seconds Total transferred: 24056000 bytes Requests per second: 6.10 [#/sec] (mean) Time per request: 1639.336 [ms] (mean) Time per request: 163.934 [ms] (mean, across all concurrent requests) 143.30 [Kbytes/sec] received Connect: 0 0 0.0 0 0 Processing: 194 1632 151.9 1645 2692 Waiting: 187 1601 154.4 1623 2691 Total: 194 1632 151.9 1645 2692 50% 1645 66% 1654 75% 1659 10

80% 1663 90% 1724 95% 1898 98% 1912 99% 1922 100% 2692 (longest request) Thin Server Software: thin Server Hostname: localhost Server Port: 3000 Time taken for tests: 144.303682 seconds Total transferred: 24024000 bytes Requests per second: 6.93 [#/sec] (mean) Time per request: 1443.037 [ms] (mean) Time per request: 144.304 [ms] (mean, across all concurrent requests) 162.57 [Kbytes/sec] received Connect: 0 0 0.0 0 0 Processing: 1059 1442 110.9 1401 1972 Waiting: 1057 1440 110.9 1399 1970 Total: 1059 1442 110.9 1401 1972 50% 1401 66% 1410 75% 1417 80% 1446 90% 1640 95% 1657 98% 1667 11

99% 1971 100% 1972 (longest request) Ebb orz mongrel cluster + mod proxy balancer Server Software: Mongrel Server Hostname: cluster.localhost Server Port: 80 Time taken for tests: 171.113394 seconds Total transferred: 24084000 bytes Requests per second: 5.84 [#/sec] (mean) Time per request: 1711.134 [ms] (mean) Time per request: 171.113 [ms] (mean, across all concurrent requests) 137.45 [Kbytes/sec] received Connect: 0 0 0.0 0 0 Processing: 556 1704 455.5 1650 2882 Waiting: 539 1633 441.6 1573 2797 Total: 556 1704 455.5 1650 2882 50% 1650 66% 1977 75% 2130 80% 2173 90% 2266 95% 2352 98% 2532 12

99% 2547 100% 2882 (longest request) Phusion-Passenger Server Software: Apache/2.2.8 Server Hostname: rails.localhost Server Port: 80 Time taken for tests: 153.686688 seconds Total transferred: 24192000 bytes Requests per second: 6.51 [#/sec] (mean) Time per request: 1536.867 [ms] (mean) Time per request: 153.687 [ms] (mean, across all concurrent requests) 153.72 [Kbytes/sec] received Connect: 0 0 0.3 0 4 Processing: 575 1534 646.5 1323 3719 Waiting: 574 1506 646.8 1297 3708 Total: 575 1534 646.5 1323 3719 50% 1323 66% 1388 75% 1426 80% 1517 90% 2823 95% 3305 98% 3474 99% 3546 100% 3719 (longest request) 13