Serving Up Your Rails App On A Mongrel Cluster

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Serving Up Your Rails App On A Mongrel Cluster - Presentation Transcript

    1. Serving up your Rails app on a Mongrel cluster Andy Lo-A-Foe andy@loafoe.nl
    2. $ whoami
    3. $ whoami • Brood: Web ontwikkelaar / Linux
    4. $ whoami • Brood: Web ontwikkelaar / Linux • Deed: PHP / Java
    5. $ whoami • Brood: Web ontwikkelaar / Linux • Deed: PHP / Java • Doet: Rails / Architectuur / etc..
    6. $ whoami • Brood: Web ontwikkelaar / Linux • Deed: PHP / Java • Doet: Rails / Architectuur / etc.. • Bij: IndependentIP
    7. Wat is Mongrel?
    8. Wat is Mongrel? • http://mongrel.rubyforge.org
    9. Wat is Mongrel? • http://mongrel.rubyforge.org • Mongrel is a fast HTTP library and server for Ruby that is intended for hosting Ruby web applications of any kind using plain HTTP rather than FastCGI or SCGI.
    10. Wat is Mongrel? • http://mongrel.rubyforge.org • Mongrel is a fast HTTP library and server for Ruby that is intended for hosting Ruby web applications of any kind using plain HTTP rather than FastCGI or SCGI. • Ontwikkelt door Zed Shaw (http://www.zedshaw.com) en anderen..
    11. Waarom Mongrel? (IMHO)
    12. Waarom Mongrel? (IMHO) • Snelheid? nope
    13. Waarom Mongrel? (IMHO) • Snelheid? nope • FastCGI zuigt? nope
    14. Waarom Mongrel? (IMHO) • Snelheid? nope • FastCGI zuigt? nope • Koelheid? yep!
    15. Waarom Mongrel? (IMHO) • Snelheid? nope • FastCGI zuigt? nope • Koelheid? yep! • Eenvoudig? yep!
    16. Waarom Mongrel? (IMHO) • Snelheid? nope • FastCGI zuigt? nope • Koelheid? yep! • Eenvoudig? yep! • Monitoring? yep!
    17. Installatie
    18. Installatie • Uitgebreide documentatie op het web: http://mongrel.rubyforge.org
    19. Installatie • Uitgebreide documentatie op het web: http://mongrel.rubyforge.org • $ sudo gem install mongrel mongrel_cluster --include-dependencies
    20. Installatie • Uitgebreide documentatie op het web: http://mongrel.rubyforge.org • $ sudo gem install mongrel mongrel_cluster --include-dependencies • $ sudo gem install fastthread
    21. Installatie • Uitgebreide documentatie op het web: http://mongrel.rubyforge.org • $ sudo gem install mongrel mongrel_cluster --include-dependencies • $ sudo gem install fastthread • $ cd rails_app_root
    22. Installatie • Uitgebreide documentatie op het web: http://mongrel.rubyforge.org • $ sudo gem install mongrel mongrel_cluster --include-dependencies • $ sudo gem install fastthread • $ cd rails_app_root • $ mongrel_rails start
    23. Installatie • Uitgebreide documentatie op het web: http://mongrel.rubyforge.org • $ sudo gem install mongrel mongrel_cluster --include-dependencies • $ sudo gem install fastthread • $ cd rails_app_root • $ mongrel_rails start • Profit!
    24. Cluster s/Apache/.../ Lighttpd(1.5.0) Nginx Pound ... Share nothing
    25. Apache config RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /system/maintenance.html [L] # Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://filmpjes_cluster% {REQUEST_URI} [P,QSA,L] <Proxy balancer://filmpjes_cluster> BalancerMember http://127.0.0.1:9000 BalancerMember http://127.0.0.1:9001 BalancerMember http://127.0.0.1:9002 BalancerMember http://127.0.0.1:9003 ....... </Proxy>
    26. Performance
    27. Performance • Statische content door Apache (of lighty..)
    28. Performance • Statische content door Apache (of lighty..) • Dynamische content door cluster
    29. Performance • Statische content door Apache (of lighty..) • Dynamische content door cluster • Cache, cache, cache
    30. Caching • Page / Action / Fragment • /dyn/140x104/11126/2.jpg • mapping • controller rendered en schrijft resultaat weg in public/dyn/140x104/111126/2.jpg • serveert via send_file :disposition => true • volgende request via Apache
    31. Monitoring • MONIT!! • http://www.tildeslash.com/monit/
    32. Vragen? • Meer info op http://www.railsguru.com

    + RobbertRobbert, 3 years ago

    custom

    1547 views, 1 favs, 1 embeds more stats

    Andy Lo-A-Foe's slide's of his presentation at the more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1547
      • 1541 on SlideShare
      • 6 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 128
    Most viewed embeds
    • 6 views on http://2007.rubyenrails.nl

    more

    All embeds
    • 6 views on http://2007.rubyenrails.nl

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories