SlideShare a Scribd company logo
1 of 223
Enterprise Hosting
    for Ruby and Python




             Julian Fischer
      fischer@enterprise-rails.de
    http://www.enterprise-rails.de
Introduction
Introduction
  About me
About me
     Julian Fischer
     ‣Twitter: http://www.twitter.com/railshoster
     ‣E-Mail: fischer@enterprise-rails.de
About me
       Julian Fischer
      ‣Twitter: http://www.twitter.com/railshoster
      ‣E-Mail: fischer@enterprise-rails.de




‣ CEO of Avarteq GmbH
About me
       Julian Fischer
       ‣Twitter: http://www.twitter.com/railshoster
       ‣E-Mail: fischer@enterprise-rails.de




‣ CEO of Avarteq GmbH
‣ Lecturer „Ruby on Rails“ @ HTWdS
About me
       Julian Fischer
       ‣Twitter: http://www.twitter.com/railshoster
       ‣E-Mail: fischer@enterprise-rails.de




‣ CEO of Avarteq GmbH
‣ Lecturer „Ruby on Rails“ @ HTWdS
‣ Ruby und Ruby on Rails programmer
About me
        Julian Fischer
       ‣Twitter: http://www.twitter.com/railshoster
       ‣E-Mail: fischer@enterprise-rails.de




‣ CEO of Avarteq GmbH
‣ Lecturer „Ruby on Rails“ @ HTWdS
‣ Ruby und Ruby on Rails programmer
‣ Entperise-Rails.de - Head of Hosting
Introduction
About Avarteq GmbH
About Avarteq GmbH




         http://www.twitter.com/railshoster
About Avarteq GmbH


‣ Founded in Nov. 2008
  from two existing companies.




               http://www.twitter.com/railshoster
About Avarteq GmbH


‣ Founded in Nov. 2008
  from two existing companies.



‣ Involvment of Key-Systems GmbH
  manages ~2,5 * 10^6 domains for customers of 200+ countries.




                    http://www.twitter.com/railshoster
About Avarteq GmbH


‣ Founded in Nov. 2008
  from two existing companies.



‣ Involvment of Key-Systems GmbH
  manages ~2,5 * 10^6 domains for customers of 200+ countries.



‣ Team size:          14 people
  8 full-time, 6 part-time/freelancer




                     http://www.twitter.com/railshoster
Introduction
  Portfolio
About Avarteq GmbH




         http://www.twitter.com/railshoster
About Avarteq GmbH


‣ Covers all stages of web development




            http://www.twitter.com/railshoster
About Avarteq GmbH


‣ Covers all stages of web development
 ‣ Consulting




            http://www.twitter.com/railshoster
About Avarteq GmbH


‣ Covers all stages of web development
 ‣ Consulting
 ‣ Conceptual ~ and screen design




            http://www.twitter.com/railshoster
About Avarteq GmbH


‣ Covers all stages of web development
 ‣ Consulting
 ‣ Conceptual ~ and screen design
 ‣ Ruby&onplace. development.
   In house in
               Rails




            http://www.twitter.com/railshoster
About Avarteq GmbH


‣ Covers all stages of web development
 ‣ Consulting
 ‣ Conceptual ~ and screen design
 ‣ Ruby&onplace. development.
   In house in
               Rails


 ‣ Ruby on Rails
   hosting/servers/clusters
   RailsHoster.de - Enterprise-Rails.de
                 http://www.twitter.com/railshoster
Enterprise Hosting
Enterprise Hosting
     Situation
EH - Basic Idea




          http://www.twitter.com/railshoster
EH - Basic Idea


‣ Given




          http://www.twitter.com/railshoster
EH - Basic Idea


‣ Given
 ‣ Python / Ruby / Rails App




           http://www.twitter.com/railshoster
EH - Basic Idea


‣ Given
 ‣ Python / Ruby / Rails App
‣ Needed




           http://www.twitter.com/railshoster
EH - Basic Idea


‣ Given
 ‣ Python / Ruby / Rails App
‣ Needed
 ‣ Max. availability ideal: 100% uptime



               http://www.twitter.com/railshoster
EH - Basic Idea


‣ Given
 ‣ Python / Ruby / Rails App
‣ Needed
 ‣ Max. availability ideal: 100% uptime
 ‣ Acceptable performance even for peaks, e.g.
   <= 200 ms response time / request




               http://www.twitter.com/railshoster
Enterprise Hosting
     Obstacles
EH - Obstacles




          http://www.twitter.com/railshoster
EH - Obstacles


‣ Single server = a lot of SPOFs




             http://www.twitter.com/railshoster
EH - Obstacles


‣ Single server = a lot of SPOFs
‣ Multiple servers = a lot of work




             http://www.twitter.com/railshoster
EH - Obstacles


‣ Single server = a lot of SPOFs
‣ Multiple servers = a lot of work
‣ Eliminating SPOFs is not easy/possible
  for every service




             http://www.twitter.com/railshoster
How to build a
fancy & rockin‘
   cluster?
Cluster Building Blocks


  Monitoring
  DBApp
   Backups
   Storage
     MA/SL
     LB




               Enterprise
                Cluster
Cluster Building Blocks


  Monitoring
  DB MA/SL
   Backups
   Storage
     LB




                  App
               Enterprise
                Cluster
Cluster Building Blocks


  Monitoring
  DB MA/SL
   Backups
   Storage




                  App
                   LB
               Enterprise
                Cluster
Cluster Building Blocks


  Monitoring
  DB MA/SL
   Backups




                Storage
                  App
                   LB
               Enterprise
                Cluster
Cluster Building Blocks


  Monitoring
   Backups




               DBApp
                Storage
                   MA/SL
                   LB
               Enterprise
                Cluster
Cluster Building Blocks


  Monitoring




               DBApp
                Backups
                Storage
                   MA/SL
                   LB
               Enterprise
                Cluster
Cluster Building Blocks




               Monitoring
               DBApp
                Backups
                Storage
                   MA/SL
                   LB
               Enterprise
                Cluster
Cluster Building Blocks




               Monitoring
               DBApp
                Backups
                Storage
                   MA/SL
                   LB
               Enterprise
                Cluster
                       ✓
maybe it‘s not that easy :)
How to build a cluster
  Requirements Analysis
How to build a cluster




           http://www.twitter.com/railshoster
How to build a cluster


‣ desired response time which again depends on several
  factors




                http://www.twitter.com/railshoster
How to build a cluster


‣ desired response time which again depends on several
  factors



  ‣ average load e.g. on a cloudy sunday afternoon




                 http://www.twitter.com/railshoster
How to build a cluster


‣ desired response time which again depends on several
  factors



  ‣ average load e.g. on a cloudy sunday afternoon
  ‣ peak load e.g. after being a new trend on twitter




                  http://www.twitter.com/railshoster
How to build a cluster


‣ desired response time which again depends on several
  factors



  ‣ average load e.g. on a cloudy sunday afternoon
  ‣ peak load e.g. after being a new trend on twitter
  ‣ ...



                  http://www.twitter.com/railshoster
How to build a cluster




           http://www.twitter.com/railshoster
How to build a cluster


‣ which components are present? search server,
  background processing, key/value store, replicating rdbms, ...




                   http://www.twitter.com/railshoster
How to build a cluster


‣ which components are present? search server,
  background processing, key/value store, replicating rdbms, ...



‣ apptired programmers? & quality coded by super geeks or a
  lot of
         performance




                   http://www.twitter.com/railshoster
How to build a cluster




           http://www.twitter.com/railshoster
How to build a cluster


‣ Do it yourself or full management?




            http://www.twitter.com/railshoster
How to build a cluster


‣ Do it yourself or full management?
 ‣ admin know how present?
   Is your team able to care of things like




                 http://www.twitter.com/railshoster
How to build a cluster


‣ Do it yourself or full management?
 ‣ admin know how present?
   Is your team able to care of things like


   ‣   os updates




                 http://www.twitter.com/railshoster
How to build a cluster


‣ Do it yourself or full management?
 ‣ admin know how present?
   Is your team able to care of things like


   ‣   os updates

   ‣   web server & load balancer setup




                 http://www.twitter.com/railshoster
How to build a cluster


‣ Do it yourself or full management?
 ‣ admin know how present?
   Is your team able to care of things like


   ‣   os updates

   ‣   web server & load balancer setup

   ‣   db configuration & tuning



                 http://www.twitter.com/railshoster
How to build a cluster


‣ Do it yourself or full management?
 ‣ admin know how present?
   Is your team able to care of things like


   ‣   os updates

   ‣   web server & load balancer setup

   ‣   db configuration & tuning

   ‣   monitoring, ...
                 http://www.twitter.com/railshoster
How to build a cluster




           http://www.twitter.com/railshoster
How to build a cluster


‣ Willing to fight with a large number of
  servers a lot of programmers don‘t want to do both: programming
  & hosting




                  http://www.twitter.com/railshoster
How to build a cluster


‣ Willing to fight with a large number of
  servers a lot of programmers don‘t want to do both: programming
  & hosting



‣ Available budget




                  http://www.twitter.com/railshoster
How to build a cluster


‣ Willing to fight with a large number of
  servers a lot of programmers don‘t want to do both: programming
  & hosting



‣ Available budget
 ‣ more servers ... more reliability, more performance




                  http://www.twitter.com/railshoster
How to build a cluster


‣ Willing to fight with a large number of
  servers a lot of programmers don‘t want to do both: programming
  & hosting



‣ Available budget
 ‣ more servers ... more reliability, more performance
‣ Many other questions ...


                  http://www.twitter.com/railshoster
How to build a cluster
Choose your HW platform
Choose HW plattform




         http://www.twitter.com/railshoster
Choose HW plattform


‣ Physical HW low budget or real server HW?




                 http://www.twitter.com/railshoster
Choose HW plattform


‣ Physical HW low budget or real server HW?
‣ Virtual HW Amazon EC2, Joyent, EY, ...




                 http://www.twitter.com/railshoster
Choose HW plattform


‣ Physical HW low budget or real server HW?
‣ Virtual HW Amazon EC2, Joyent, EY, ...
‣ Assume we use physical HW ...




                 http://www.twitter.com/railshoster
Choose HW plattform




         http://www.twitter.com/railshoster
Choose HW plattform


‣ Compare TCO and performance/€




           http://www.twitter.com/railshoster
Choose HW plattform


‣ Compare TCO and performance/€
‣ When is your next scale out?




            http://www.twitter.com/railshoster
Choose HW plattform


‣ Compare TCO and performance/€
‣ When is your next scale out?
‣ Do you really need to scale within
  hours? ... and is it worth to pay a lot of extra money?
  Estimate your resource consumption grow rate e.g. using Munin.




                    http://www.twitter.com/railshoster
How to build a cluster
   Cluster dimensions
Cluster dimensions




          http://www.twitter.com/railshoster
Cluster dimensions


‣ How many servers needed? 2, 4, 6, 10, ...




               http://www.twitter.com/railshoster
Cluster dimensions


‣ How many servers needed? 2, 4, 6, 10, ...
‣ Which systems components will be there?
  App, MA DB, SL DB, BG-Jobs, Search-Server, Memcached, Storage, ...




                    http://www.twitter.com/railshoster
Cluster dimensions


‣ How many servers needed? 2, 4, 6, 10, ...
‣ Which systems components will be there?
  App, MA DB, SL DB, BG-Jobs, Search-Server, Memcached, Storage, ...



‣ Which HW will be most suitable for each
   individual role? DB Server = a lot of fast hdds, BG-Kob
   Server = a lot of cpus, ...




                        http://www.twitter.com/railshoster
How to build a cluster
     Cluster design
Cluster design




          http://www.twitter.com/railshoster
Cluster design


‣ How to distribute components to servers?




            http://www.twitter.com/railshoster
Cluster design


‣ How to distribute components to servers?
 ‣ App Server & DB Server together?




            http://www.twitter.com/railshoster
Cluster design


‣ How to distribute components to servers?
 ‣ App Server & DB Server together?
 ‣ Dedicated DB Server?




            http://www.twitter.com/railshoster
Cluster design




          http://www.twitter.com/railshoster
Cluster design


 ‣ Where to put the search server? Sphinx,
   Solr, ...




            http://www.twitter.com/railshoster
Cluster design


 ‣ Where to put the search server? Sphinx,
   Solr, ...



 ‣ Where to run background jobs?




            http://www.twitter.com/railshoster
Cluster design


 ‣ Where to put the search server? Sphinx,
   Solr, ...



 ‣ Where to run background jobs?
 ‣ Where to run message queues? See talk of
   Paolo Negri.




            http://www.twitter.com/railshoster
How to build a cluster
  Cluster building blocks
Cluster building blocks
        Network
Network




          http://www.twitter.com/railshoster
Network


‣ Connection between cluster nodes




            http://www.twitter.com/railshoster
Network


‣ Connection between cluster nodes
‣ Use a private (!) physical network




             http://www.twitter.com/railshoster
Network


‣ Connection between cluster nodes
‣ Use a private (!) physical network
‣ Minimize communication latency distribution
  might cost performance for low load scenarios




              http://www.twitter.com/railshoster
Network


‣ Connection between cluster nodes
‣ Use a private (!) physical network
‣ Minimize communication latency distribution
  might cost performance for low load scenarios



‣ >= 1even within the same datacenter hosters limit bandwith between
  servers
          GBit/s be aware that some




                    http://www.twitter.com/railshoster
Cluster building blocks
    Application Server
Application Server




          http://www.twitter.com/railshoster
Application Server


‣ Ruby / Ruby on Rails




            http://www.twitter.com/railshoster
Application Server


‣ Ruby / Ruby on Rails
 ‣ Passenger our favorite.




               http://www.twitter.com/railshoster
Application Server


‣ Ruby / Ruby on Rails
 ‣ Passenger our favorite.
 ‣ LB &&interesting. Thin and mongrel do their job.
   Unicorn is
              (Unicorn || Thin || Mongrel)




               http://www.twitter.com/railshoster
Application Server


‣ Ruby / Ruby on Rails
 ‣ Passenger our favorite.
 ‣ LB &&interesting. Thin and mongrel do their job.
   Unicorn is
              (Unicorn || Thin || Mongrel)


 ‣ JRuby with Glassfish-Gem or servlet containers
   like Glassfish-Server, Jetty, Tomacat, ...




               http://www.twitter.com/railshoster
Application Server


‣ Ruby / Ruby on Rails
 ‣ Passenger our favorite.
 ‣ LB &&interesting. Thin and mongrel do their job.
   Unicorn is
              (Unicorn || Thin || Mongrel)


 ‣ JRuby with Glassfish-Gem or servlet containers
   like Glassfish-Server, Jetty, Tomacat, ...



 ‣ others CGI, fastCGI, SCGI, ...
                 http://www.twitter.com/railshoster
Application Server




          http://www.twitter.com/railshoster
Application Server


‣ Python




           http://www.twitter.com/railshoster
Application Server


‣ Python
 ‣ mod_python run Python interpreter inside apache.




                http://www.twitter.com/railshoster
Application Server


‣ Python
 ‣ mod_python run Python interpreter inside apache.
 ‣ mod_wsgi better speed & memory usage than mod_python.




                http://www.twitter.com/railshoster
Application Server


‣ Python
 ‣ mod_python run Python interpreter inside apache.
 ‣ mod_wsgi better speed & memory usage than mod_python.
 ‣ others CGI, fastCGI, SCGI, ...



                 http://www.twitter.com/railshoster
Cluster building blocks
      Load Balancer
Load Balancer




         http://www.twitter.com/railshoster
Load Balancer


‣ Most likely not the bottleneck




             http://www.twitter.com/railshoster
Load Balancer


‣ Most likely not the bottleneck
‣ Often a single point of failure (SPOF)




             http://www.twitter.com/railshoster
Load Balancer


‣ Most likely not the bottleneck
‣ Often a single point of failure (SPOF)
‣ Two are better than one!




             http://www.twitter.com/railshoster
Load Balancer


‣ Most likely not the bottleneck
‣ Often a single point of failure (SPOF)
‣ Two are better than one!
‣ What to do if one fails?



             http://www.twitter.com/railshoster
Load Balancer


‣ Most likely not the bottleneck
‣ Often a single point of failure (SPOF)
‣ Two are better than one!
‣ What to do if one fails?
‣ Setup automatic IP failover not possible in every
  datacenter




                http://www.twitter.com/railshoster
Load Balancer




         http://www.twitter.com/railshoster
Load Balancer


‣ Open Source Software LBs




           http://www.twitter.com/railshoster
Load Balancer


‣ Open Source Software LBs
 ‣ Apache, NGINX, Pound, HA Proxy, ...




           http://www.twitter.com/railshoster
Load Balancer


‣ Open Source Software LBs
  ‣ Apache, NGINX, Pound, HA Proxy, ...
‣ LB Appliances BalanceNG, ...




               http://www.twitter.com/railshoster
Cluster building blocks
        Storage
Storage




          http://www.twitter.com/railshoster
Storage


‣ Use a shared filesystem to store user
  uploads such as profile pictures, etc.




                   http://www.twitter.com/railshoster
Storage


‣ Use a shared filesystem to store user
  uploads such as profile pictures, etc.

‣ Some storage technologies




                   http://www.twitter.com/railshoster
Storage


‣ Use a shared filesystem to store user
  uploads such as profile pictures, etc.

‣ Some storage technologies
 ‣ NFS, sync or async, often a SPOF, lot of overhead




                   http://www.twitter.com/railshoster
Storage


‣ Use a shared filesystem to store user
  uploads such as profile pictures, etc.

‣ Some storage technologies
 ‣ NFS, sync or async, often a SPOF, lot of overhead
 ‣ RSync, async, replication lag


                   http://www.twitter.com/railshoster
Storage


‣ Use a shared filesystem to store user
  uploads such as profile pictures, etc.

‣ Some storage technologies
 ‣ NFS, sync or async, often a SPOF, lot of overhead
 ‣ RSync, async, replication lag
 ‣ iSCSI && (GFS || OCFS2), incredibly fast
                   http://www.twitter.com/railshoster
Storage
 iSCSI
iSCSI Storage




          http://www.twitter.com/railshoster
iSCSI Storage


‣ iSCSI = SCSI over TCP




            http://www.twitter.com/railshoster
iSCSI Storage


‣ iSCSI = SCSI over TCP
‣ Exports a blockdevice




            http://www.twitter.com/railshoster
iSCSI Storage


‣ iSCSI = SCSI over TCP
‣ Exports a blockdevice
‣ iSCSI = less overhead than NFS




            http://www.twitter.com/railshoster
iSCSI Storage


‣ iSCSI = SCSI over TCP
‣ Exports a blockdevice
‣ iSCSI = less overhead than NFS
‣ Need to use a distributed FS like



             http://www.twitter.com/railshoster
iSCSI Storage


‣ iSCSI = SCSI over TCP
‣ Exports a blockdevice
‣ iSCSI = less overhead than NFS
‣ Need to use a distributed FS like
 ‣ GFS

             http://www.twitter.com/railshoster
iSCSI Storage


‣ iSCSI = SCSI over TCP
‣ Exports a blockdevice
‣ iSCSI = less overhead than NFS
‣ Need to use a distributed FS like
 ‣ GFS
 ‣ OCFS2
             http://www.twitter.com/railshoster
Storage
iSCSI Storage Appliance
iSCSI Storage Appliance




          http://www.twitter.com/railshoster
iSCSI Storage Appliance


‣ Think about using a storage appliance, e.g.
  NetApp




             http://www.twitter.com/railshoster
iSCSI Storage Appliance


‣ Think about using a storage appliance, e.g.
  NetApp



 ‣ Has redundant HW




             http://www.twitter.com/railshoster
iSCSI Storage Appliance


‣ Think about using a storage appliance, e.g.
  NetApp



 ‣ Has redundant HW
 ‣ Out of the box solution




             http://www.twitter.com/railshoster
iSCSI Storage Appliance


‣ Think about using a storage appliance, e.g.
  NetApp



 ‣ Has redundant HW
 ‣ Out of the box solution
 ‣ Very low maintenance



             http://www.twitter.com/railshoster
iSCSI Storage Appliance


‣ Think about using a storage appliance, e.g.
  NetApp



 ‣ Has redundant HW
 ‣ Out of the box solution
 ‣ Very low maintenance
 ‣ Connect each app server via dedicated
    GBit LAN connections
             http://www.twitter.com/railshoster
Cluster building blocks
       Database
Database




           http://www.twitter.com/railshoster
Database


‣ RDBMS? There are alternatives CouchDB, MongoDB, ...




                  http://www.twitter.com/railshoster
Database


‣ RDBMS? There are alternatives CouchDB, MongoDB, ...
‣ Most likely MySQL, Postgres, ...




                  http://www.twitter.com/railshoster
Database


‣ RDBMS? There are alternatives CouchDB, MongoDB, ...
‣ Most likely MySQL, Postgres, ...
‣ Horizontal DB scale out is ugly




                  http://www.twitter.com/railshoster
Database


‣ RDBMS? There are alternatives CouchDB, MongoDB, ...
‣ Most likely MySQL, Postgres, ...
‣ Horizontal DB scale out is ugly
‣ Scaleout vertically, first



                  http://www.twitter.com/railshoster
Database


‣ RDBMS? There are alternatives CouchDB, MongoDB, ...
‣ Most likely MySQL, Postgres, ...
‣ Horizontal DB scale out is ugly
‣ Scaleout vertically, first
  ‣ CPU++, RAM++, a lot of fast HDDs

                  http://www.twitter.com/railshoster
Horizontal MySQL
     scaling?
Database
MySQL NDB Cluster
Database




           http://www.twitter.com/railshoster
Database


‣ NDB MySQL Cluster




           http://www.twitter.com/railshoster
Database


‣ NDB MySQL Cluster
 ‣ Features look performance, ... automatic failover,
   transactions, good write
                            very nice




                 http://www.twitter.com/railshoster
Database


‣ NDB MySQL Cluster
 ‣ Features look performance, ... automatic failover,
   transactions, good write
                            very nice


 ‣ At failover advantages.
   gain
        least 3 physical maschines needed to




                 http://www.twitter.com/railshoster
Database


‣ NDB MySQL Cluster
 ‣ Features look performance, ... automatic failover,
   transactions, good write
                            very nice


 ‣ At failover advantages.
   gain
        least 3 physical maschines needed to


 ‣ Certain joins.
   such as large
                 statements are incredibly slow



                 http://www.twitter.com/railshoster
Database


‣ NDB MySQL Cluster
 ‣ Features look performance, ... automatic failover,
   transactions, good write
                            very nice


 ‣ At failover advantages.
   gain
        least 3 physical maschines needed to


 ‣ Certain joins.
   such as large
                 statements are incredibly slow


 ‣ DB sizestored in memory. RAM size since indexed
   columns are
               limited by
                 http://www.twitter.com/railshoster
Database




           http://www.twitter.com/railshoster
Database


‣ NDB MySQL Cluster




           http://www.twitter.com/railshoster
Database


‣ NDB MySQL Cluster
 ‣ Only suitable for certain situations




            http://www.twitter.com/railshoster
Database


‣ NDB MySQL Cluster
 ‣ Only suitable for certain situations
   ‣ Joins avoided by using a search server
     solr, sphinx, ...




            http://www.twitter.com/railshoster
Database


‣ NDB MySQL Cluster
 ‣ Only suitable for certain situations
   ‣ Joins avoided by using a search server
     solr, sphinx, ...



   ‣ Many write transactions but slow data grow rate



              http://www.twitter.com/railshoster
Database


‣ NDB MySQL Cluster
 ‣ Only suitable for certain situations
   ‣ Joins avoided by using a search server
     solr, sphinx, ...



   ‣ Many write transactions but slow data grow rate
‣ Maybe replication is an alternative ...

              http://www.twitter.com/railshoster
Database
Replication
Database




           http://www.twitter.com/railshoster
Database


‣ MA/MA replication




           http://www.twitter.com/railshoster
Database


‣ MA/MA replication
 ‣ Possible but




             http://www.twitter.com/railshoster
Database


‣ MA/MA replication
 ‣ Possible but
 ‣ Not conflicts
   record
          recommendable except your app resolves db




               http://www.twitter.com/railshoster
Database




           http://www.twitter.com/railshoster
Database


‣ MA/SL replication




           http://www.twitter.com/railshoster
Database


‣ MA/SL replication
 ‣ Good starting point




           http://www.twitter.com/railshoster
Database


‣ MA/SL replication
 ‣ Good starting point
   ‣ SL = realtime backup of MA DB but




            http://www.twitter.com/railshoster
Database


‣ MA/SL replication
 ‣ Good starting point
   ‣ SL = realtime backup of MA DB but
   ‣ Can be used read-only



            http://www.twitter.com/railshoster
Database


‣ MA/SL replication
 ‣ Good starting point
   ‣ SL = realtime backup of MA DB but
   ‣ Can be used read-only
   ‣ No automatica failover but manual failoverfor the
     faster than reinstalling single server. But calculate time
                                                                is still

      master reintegration!



                   http://www.twitter.com/railshoster
Software
Deployment
Deployment
Deployment


‣ Capistrano
Deployment


‣ Capistrano
‣ Adapt deployment recipe to server and server
  roles
Deployment


‣ Capistrano
‣ Adapt deployment recipe to server and server
  roles



‣ Initial deployment painful
Deployment


‣ Capistrano
‣ Adapt deployment recipe to server and server
  roles



‣ Initial deployment painful
‣ Further deployments more or less painless
Backups
Backups
Backups


‣ Create automated backups!
Backups


‣ Create automated backups!
‣ Cover filesystem and database
Backups


‣ Create automated backups!
‣ Cover filesystem and database
‣ Create them, pack them, encrypt them
  and upload them to a safe place. e.g. use
  duplicity!
Backups


‣ Create automated backups!
‣ Cover filesystem and database
‣ Create them, pack them, encrypt them
  and upload them to a safe place. e.g. use
  duplicity!



‣ Test backups regularily. Broken backups = no backups.
Monitoring
„Just because you’re paranoid, doesn’t mean
         they’re not out to get you.“
How does your admin know that something
               is broken?
Monitoring
  Nagios
Nagios
Nagios


‣ Nagios monitors key resources of a
  system. At least it that how it should be configured.
Nagios


‣ Nagios monitors key resources of a
  system. At least it that how it should be configured.

‣ Is some resource not responding or hits a
  threshold: notify! Again, that‘s how it should be.
Nagios


‣ Nagios monitors key resources of a
    system. At least it that how it should be configured.

‣ Is some resource not responding or hits a
    threshold: notify! Again, that‘s how it should be.

‣   Also consider using monit for local proactive monitoring issues.
Nagios
Nagios


‣ What should be checked? List is incomplete.
Nagios


‣ What should be checked? List is incomplete.
  ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow.
Nagios


‣ What should be checked? List is incomplete.
  ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow.
  ‣ LOAD. More sysload than cores? Processes need to wait.
Nagios


‣ What should be checked? List is incomplete.
  ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow.
  ‣ LOAD. More sysload than cores? Processes need to wait.
  ‣ HTTP. Webserver, are you still there?
Nagios


‣ What should be checked? List is incomplete.
  ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow.
  ‣ LOAD. More sysload than cores? Processes need to wait.
  ‣ HTTP. Webserver, are you still there?
  ‣ APP. Does my app still serve my control string XY?
Nagios


‣ What should be checked? List is incomplete.
  ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow.
  ‣ LOAD. More sysload than cores? Processes need to wait.
  ‣ HTTP. Webserver, are you still there?
  ‣ APP. Does my app still serve my control string XY?
  ‣ and a lot more!
Monitoring
Resource History
Resource History
Resource History


‣ Munin
Resource History
Resource History


‣ Stores the consumption of individual
  resources over time.
Resource History


‣ Stores the consumption of individual
   resources over time.

‣ Trend analysis. What happened after the last puplicity ploy
  on our servers?
Resource History


‣ Stores the consumption of individual
   resources over time.

‣ Trend analysis. What happened after the last puplicity ploy
  on our servers?



‣ Scale out needed? Or maybe in a month?
Resource History


‣ Stores the consumption of individual
   resources over time.

‣ Trend analysis. What happened after the last puplicity ploy
  on our servers?



‣ Scale out needed? Or maybe in a month?
‣ Does my app leak?
Maintenance
Maintenance
Maintenance


‣ OS updates. updates.
  Minor-, major-, distro
Maintenance


‣ OS updates. updates.
  Minor-, major-, distro


  ‣   Take a server out of the cluster to perform bigger updates. Reintegrate
      if afterwards. No or minor service impact.
Maintenance


‣ OS updates. updates.
  Minor-, major-, distro


  ‣   Take a server out of the cluster to perform bigger updates. Reintegrate
      if afterwards. No or minor service impact.



‣ Ruby Updates. Ruby, Rails, Gems, ...
Maintenance


‣ OS updates. updates.
  Minor-, major-, distro


  ‣   Take a server out of the cluster to perform bigger updates. Reintegrate
      if afterwards. No or minor service impact.



‣ Ruby Updates. Ruby, Rails, Gems, ...
‣ Rotation and monitoring of logs. Bad things
  going on?
Maintenance


‣ OS updates. updates.
  Minor-, major-, distro


  ‣   Take a server out of the cluster to perform bigger updates. Reintegrate
      if afterwards. No or minor service impact.



‣ Ruby Updates. Ruby, Rails, Gems, ...
‣ Rotation and monitoring of logs. Bad things
  going on?



‣ Check your backups!
Maintenance


‣ OS updates. updates.
  Minor-, major-, distro


  ‣     Take a server out of the cluster to perform bigger updates. Reintegrate
        if afterwards. No or minor service impact.



‣ Ruby Updates. Ruby, Rails, Gems, ...
‣ Rotation and monitoring of logs. Bad things
  going on?



‣ Check your backups!
‣ ...
Fazit




        Ok, nice to know but ...
Fazit




... who the hell should to do all those
  things and additionally develop an
             application?
Thank you
                      for your
                     attention!


Headquarter:                Rails Enterprise Hosting:
http://www.avarteq.de            http://www.enterprise-
                                               rails.de
Blog:
http://ww.treibstofff.de               Rails Hosting:
                              http://www.railshoster.de
Resources




            http://www.twitter.com/railshoster
Resources

‣   Python Web Application Hosting
    http://hostingfu.com/article/python-web-application-hosting




                      http://www.twitter.com/railshoster
Resources

‣   Python Web Application Hosting
    http://hostingfu.com/article/python-web-application-hosting


‣   Apache and mod_wsgi
    http://djangoinproduction.com/wiki/Apache_and_mod_wsgi




                      http://www.twitter.com/railshoster
Resources

‣   Python Web Application Hosting
    http://hostingfu.com/article/python-web-application-hosting


‣   Apache and mod_wsgi
    http://djangoinproduction.com/wiki/Apache_and_mod_wsgi


‣   MySQL Cluster
    http://www.mysql.com/products/database/cluster/




                      http://www.twitter.com/railshoster
Resources

‣   Python Web Application Hosting
    http://hostingfu.com/article/python-web-application-hosting


‣   Apache and mod_wsgi
    http://djangoinproduction.com/wiki/Apache_and_mod_wsgi


‣   MySQL Cluster
    http://www.mysql.com/products/database/cluster/


‣   Duplicity Backup Tool
    http://duplicity.nongnu.org/




                      http://www.twitter.com/railshoster

More Related Content

What's hot

High Performance WordPress - WordCamp Jerusalem 2010
High Performance WordPress - WordCamp Jerusalem 2010High Performance WordPress - WordCamp Jerusalem 2010
High Performance WordPress - WordCamp Jerusalem 2010
Barry Abrahamson
 

What's hot (20)

Nürnberg WooCommerce Talk - 11/24/16
Nürnberg WooCommerce Talk - 11/24/16Nürnberg WooCommerce Talk - 11/24/16
Nürnberg WooCommerce Talk - 11/24/16
 
WordPress London Developer Operations For Beginners
WordPress London Developer Operations For BeginnersWordPress London Developer Operations For Beginners
WordPress London Developer Operations For Beginners
 
My Database Skills Killed the Server
My Database Skills Killed the ServerMy Database Skills Killed the Server
My Database Skills Killed the Server
 
Carrying Enterprise on a Little Camel
Carrying Enterprise on a Little CamelCarrying Enterprise on a Little Camel
Carrying Enterprise on a Little Camel
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
 
How to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPressHow to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPress
 
Local development with vvv jon trujillo
Local development with vvv   jon trujilloLocal development with vvv   jon trujillo
Local development with vvv jon trujillo
 
CIRCUIT 2015 - Monitoring AEM
CIRCUIT 2015 - Monitoring AEMCIRCUIT 2015 - Monitoring AEM
CIRCUIT 2015 - Monitoring AEM
 
MySQL crash course by moshe kaplan
MySQL crash course by moshe kaplanMySQL crash course by moshe kaplan
MySQL crash course by moshe kaplan
 
Create rails project
Create rails projectCreate rails project
Create rails project
 
Introduction to-ict
Introduction to-ictIntroduction to-ict
Introduction to-ict
 
10 common cf server challenges
10 common cf server challenges10 common cf server challenges
10 common cf server challenges
 
WordCamp Belfast DevOps for Beginners
WordCamp Belfast DevOps for BeginnersWordCamp Belfast DevOps for Beginners
WordCamp Belfast DevOps for Beginners
 
PHPDay 2013 - High Performance PHP
PHPDay 2013 - High Performance PHPPHPDay 2013 - High Performance PHP
PHPDay 2013 - High Performance PHP
 
Use Xdebug to profile PHP
Use Xdebug to profile PHPUse Xdebug to profile PHP
Use Xdebug to profile PHP
 
Fundamentals of TempDB
Fundamentals of TempDBFundamentals of TempDB
Fundamentals of TempDB
 
High Performance WordPress - WordCamp Jerusalem 2010
High Performance WordPress - WordCamp Jerusalem 2010High Performance WordPress - WordCamp Jerusalem 2010
High Performance WordPress - WordCamp Jerusalem 2010
 
Running and Scaling Magento on AWS
Running and Scaling Magento on AWSRunning and Scaling Magento on AWS
Running and Scaling Magento on AWS
 
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
 
Edge 2016 service workers and other front end techniques
Edge 2016 service workers and other front end techniquesEdge 2016 service workers and other front end techniques
Edge 2016 service workers and other front end techniques
 

Viewers also liked (6)

Kenneth_Crews_Copyright_and_Digital_Humanities
Kenneth_Crews_Copyright_and_Digital_HumanitiesKenneth_Crews_Copyright_and_Digital_Humanities
Kenneth_Crews_Copyright_and_Digital_Humanities
 
Multimodalities
MultimodalitiesMultimodalities
Multimodalities
 
ICEE Bookclub_ AGU 2013_ Buhr
ICEE Bookclub_ AGU 2013_ BuhrICEE Bookclub_ AGU 2013_ Buhr
ICEE Bookclub_ AGU 2013_ Buhr
 
Crucible Project Cards
Crucible Project CardsCrucible Project Cards
Crucible Project Cards
 
Honor campaign intructions
Honor campaign intructionsHonor campaign intructions
Honor campaign intructions
 
Power of Intuition by Pavan Choudary
Power of Intuition by Pavan ChoudaryPower of Intuition by Pavan Choudary
Power of Intuition by Pavan Choudary
 

Similar to Enterprise Hosting

Similar to Enterprise Hosting (20)

Abusing the Cloud for Fun and Profit
Abusing the Cloud for Fun and ProfitAbusing the Cloud for Fun and Profit
Abusing the Cloud for Fun and Profit
 
Deploy Rails Application by Capistrano
Deploy Rails Application by CapistranoDeploy Rails Application by Capistrano
Deploy Rails Application by Capistrano
 
Migration Best Practices - SEOkomm 2018
Migration Best Practices - SEOkomm 2018Migration Best Practices - SEOkomm 2018
Migration Best Practices - SEOkomm 2018
 
Deploy like a pro!
Deploy like a pro!Deploy like a pro!
Deploy like a pro!
 
Scaling PHP apps
Scaling PHP appsScaling PHP apps
Scaling PHP apps
 
Amp your site: An intro to accelerated mobile pages
Amp your site: An intro to accelerated mobile pagesAmp your site: An intro to accelerated mobile pages
Amp your site: An intro to accelerated mobile pages
 
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
 
Demystifying web performance tooling and metrics
Demystifying web performance tooling and metricsDemystifying web performance tooling and metrics
Demystifying web performance tooling and metrics
 
Born in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupBorn in the Cloud, Built like a Startup
Born in the Cloud, Built like a Startup
 
The automation challenge: Kubernetes Operators vs Helm Charts
The automation challenge: Kubernetes Operators vs Helm ChartsThe automation challenge: Kubernetes Operators vs Helm Charts
The automation challenge: Kubernetes Operators vs Helm Charts
 
RESS: An Evolution of Responsive Web Design
RESS: An Evolution of Responsive Web DesignRESS: An Evolution of Responsive Web Design
RESS: An Evolution of Responsive Web Design
 
Rapid API Development with LoopBack/StrongLoop
Rapid API Development with LoopBack/StrongLoopRapid API Development with LoopBack/StrongLoop
Rapid API Development with LoopBack/StrongLoop
 
Caching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTourCaching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTour
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
 
Apache Traffic Server
Apache Traffic ServerApache Traffic Server
Apache Traffic Server
 
DiUS Computing Lca Rails Final
DiUS  Computing Lca Rails FinalDiUS  Computing Lca Rails Final
DiUS Computing Lca Rails Final
 
The automation challenge Kubernetes operators vs Helm charts
The automation challenge Kubernetes operators vs Helm chartsThe automation challenge Kubernetes operators vs Helm charts
The automation challenge Kubernetes operators vs Helm charts
 
WordPress Continuous Maintenance
WordPress Continuous MaintenanceWordPress Continuous Maintenance
WordPress Continuous Maintenance
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to Deployment
 
SD Times - Docker v2
SD Times - Docker v2SD Times - Docker v2
SD Times - Docker v2
 

More from Avarteq

More from Avarteq (20)

Kanban - Classes of Service
Kanban - Classes of ServiceKanban - Classes of Service
Kanban - Classes of Service
 
Kanban - Set Work in Progress Limits
Kanban - Set Work in Progress LimitsKanban - Set Work in Progress Limits
Kanban - Set Work in Progress Limits
 
Kanban - Set a pace for the input
Kanban - Set a pace for the inputKanban - Set a pace for the input
Kanban - Set a pace for the input
 
Kanban – Visualizing the value chain
Kanban – Visualizing the value chain Kanban – Visualizing the value chain
Kanban – Visualizing the value chain
 
Kanban - Establish a Delivery Rhythm
Kanban - Establish a Delivery RhythmKanban - Establish a Delivery Rhythm
Kanban - Establish a Delivery Rhythm
 
Kanban - How to coordinate with Kanban
Kanban - How to coordinate with KanbanKanban - How to coordinate with Kanban
Kanban - How to coordinate with Kanban
 
Kanban: Kaizen - Culture of continuous improvement
Kanban: Kaizen - Culture of continuous improvementKanban: Kaizen - Culture of continuous improvement
Kanban: Kaizen - Culture of continuous improvement
 
Kanban - Extreme improvements in five quarters
Kanban - Extreme improvements in five quartersKanban - Extreme improvements in five quarters
Kanban - Extreme improvements in five quarters
 
Kanban - A recipe for success
Kanban - A recipe for successKanban - A recipe for success
Kanban - A recipe for success
 
The Kanban method
The Kanban methodThe Kanban method
The Kanban method
 
Kanban: The Dilemma of an Agile Manager
Kanban: The Dilemma of an Agile ManagerKanban: The Dilemma of an Agile Manager
Kanban: The Dilemma of an Agile Manager
 
Ruby Grundlagen
Ruby GrundlagenRuby Grundlagen
Ruby Grundlagen
 
Opscode Chef - Grundlagen
Opscode Chef - GrundlagenOpscode Chef - Grundlagen
Opscode Chef - Grundlagen
 
Einführung in Opscode Chef - Voraussetzungen
Einführung in Opscode Chef - VoraussetzungenEinführung in Opscode Chef - Voraussetzungen
Einführung in Opscode Chef - Voraussetzungen
 
RabbitMQ mit (J)Ruby
RabbitMQ mit (J)RubyRabbitMQ mit (J)Ruby
RabbitMQ mit (J)Ruby
 
JRuby
JRubyJRuby
JRuby
 
Enterprise rails hosting 3 ways to scale - 2011-10
Enterprise rails hosting   3 ways to scale - 2011-10 Enterprise rails hosting   3 ways to scale - 2011-10
Enterprise rails hosting 3 ways to scale - 2011-10
 
Julian Fischer Ruby On Rails
Julian Fischer   Ruby On RailsJulian Fischer   Ruby On Rails
Julian Fischer Ruby On Rails
 
Mehrserver Lösungen
Mehrserver LösungenMehrserver Lösungen
Mehrserver Lösungen
 
Evolutionary Algorithms In Ruby
Evolutionary Algorithms In RubyEvolutionary Algorithms In Ruby
Evolutionary Algorithms In Ruby
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Enterprise Hosting

  • 1. Enterprise Hosting for Ruby and Python Julian Fischer fischer@enterprise-rails.de http://www.enterprise-rails.de
  • 4. About me Julian Fischer ‣Twitter: http://www.twitter.com/railshoster ‣E-Mail: fischer@enterprise-rails.de
  • 5. About me Julian Fischer ‣Twitter: http://www.twitter.com/railshoster ‣E-Mail: fischer@enterprise-rails.de ‣ CEO of Avarteq GmbH
  • 6. About me Julian Fischer ‣Twitter: http://www.twitter.com/railshoster ‣E-Mail: fischer@enterprise-rails.de ‣ CEO of Avarteq GmbH ‣ Lecturer „Ruby on Rails“ @ HTWdS
  • 7. About me Julian Fischer ‣Twitter: http://www.twitter.com/railshoster ‣E-Mail: fischer@enterprise-rails.de ‣ CEO of Avarteq GmbH ‣ Lecturer „Ruby on Rails“ @ HTWdS ‣ Ruby und Ruby on Rails programmer
  • 8. About me Julian Fischer ‣Twitter: http://www.twitter.com/railshoster ‣E-Mail: fischer@enterprise-rails.de ‣ CEO of Avarteq GmbH ‣ Lecturer „Ruby on Rails“ @ HTWdS ‣ Ruby und Ruby on Rails programmer ‣ Entperise-Rails.de - Head of Hosting
  • 10. About Avarteq GmbH http://www.twitter.com/railshoster
  • 11. About Avarteq GmbH ‣ Founded in Nov. 2008 from two existing companies. http://www.twitter.com/railshoster
  • 12. About Avarteq GmbH ‣ Founded in Nov. 2008 from two existing companies. ‣ Involvment of Key-Systems GmbH manages ~2,5 * 10^6 domains for customers of 200+ countries. http://www.twitter.com/railshoster
  • 13. About Avarteq GmbH ‣ Founded in Nov. 2008 from two existing companies. ‣ Involvment of Key-Systems GmbH manages ~2,5 * 10^6 domains for customers of 200+ countries. ‣ Team size: 14 people 8 full-time, 6 part-time/freelancer http://www.twitter.com/railshoster
  • 15. About Avarteq GmbH http://www.twitter.com/railshoster
  • 16. About Avarteq GmbH ‣ Covers all stages of web development http://www.twitter.com/railshoster
  • 17. About Avarteq GmbH ‣ Covers all stages of web development ‣ Consulting http://www.twitter.com/railshoster
  • 18. About Avarteq GmbH ‣ Covers all stages of web development ‣ Consulting ‣ Conceptual ~ and screen design http://www.twitter.com/railshoster
  • 19. About Avarteq GmbH ‣ Covers all stages of web development ‣ Consulting ‣ Conceptual ~ and screen design ‣ Ruby&onplace. development. In house in Rails http://www.twitter.com/railshoster
  • 20. About Avarteq GmbH ‣ Covers all stages of web development ‣ Consulting ‣ Conceptual ~ and screen design ‣ Ruby&onplace. development. In house in Rails ‣ Ruby on Rails hosting/servers/clusters RailsHoster.de - Enterprise-Rails.de http://www.twitter.com/railshoster
  • 22. Enterprise Hosting Situation
  • 23. EH - Basic Idea http://www.twitter.com/railshoster
  • 24. EH - Basic Idea ‣ Given http://www.twitter.com/railshoster
  • 25. EH - Basic Idea ‣ Given ‣ Python / Ruby / Rails App http://www.twitter.com/railshoster
  • 26. EH - Basic Idea ‣ Given ‣ Python / Ruby / Rails App ‣ Needed http://www.twitter.com/railshoster
  • 27. EH - Basic Idea ‣ Given ‣ Python / Ruby / Rails App ‣ Needed ‣ Max. availability ideal: 100% uptime http://www.twitter.com/railshoster
  • 28. EH - Basic Idea ‣ Given ‣ Python / Ruby / Rails App ‣ Needed ‣ Max. availability ideal: 100% uptime ‣ Acceptable performance even for peaks, e.g. <= 200 ms response time / request http://www.twitter.com/railshoster
  • 29. Enterprise Hosting Obstacles
  • 30. EH - Obstacles http://www.twitter.com/railshoster
  • 31. EH - Obstacles ‣ Single server = a lot of SPOFs http://www.twitter.com/railshoster
  • 32. EH - Obstacles ‣ Single server = a lot of SPOFs ‣ Multiple servers = a lot of work http://www.twitter.com/railshoster
  • 33. EH - Obstacles ‣ Single server = a lot of SPOFs ‣ Multiple servers = a lot of work ‣ Eliminating SPOFs is not easy/possible for every service http://www.twitter.com/railshoster
  • 34. How to build a fancy & rockin‘ cluster?
  • 35. Cluster Building Blocks Monitoring DBApp Backups Storage MA/SL LB Enterprise Cluster
  • 36. Cluster Building Blocks Monitoring DB MA/SL Backups Storage LB App Enterprise Cluster
  • 37. Cluster Building Blocks Monitoring DB MA/SL Backups Storage App LB Enterprise Cluster
  • 38. Cluster Building Blocks Monitoring DB MA/SL Backups Storage App LB Enterprise Cluster
  • 39. Cluster Building Blocks Monitoring Backups DBApp Storage MA/SL LB Enterprise Cluster
  • 40. Cluster Building Blocks Monitoring DBApp Backups Storage MA/SL LB Enterprise Cluster
  • 41. Cluster Building Blocks Monitoring DBApp Backups Storage MA/SL LB Enterprise Cluster
  • 42. Cluster Building Blocks Monitoring DBApp Backups Storage MA/SL LB Enterprise Cluster ✓
  • 43. maybe it‘s not that easy :)
  • 44. How to build a cluster Requirements Analysis
  • 45. How to build a cluster http://www.twitter.com/railshoster
  • 46. How to build a cluster ‣ desired response time which again depends on several factors http://www.twitter.com/railshoster
  • 47. How to build a cluster ‣ desired response time which again depends on several factors ‣ average load e.g. on a cloudy sunday afternoon http://www.twitter.com/railshoster
  • 48. How to build a cluster ‣ desired response time which again depends on several factors ‣ average load e.g. on a cloudy sunday afternoon ‣ peak load e.g. after being a new trend on twitter http://www.twitter.com/railshoster
  • 49. How to build a cluster ‣ desired response time which again depends on several factors ‣ average load e.g. on a cloudy sunday afternoon ‣ peak load e.g. after being a new trend on twitter ‣ ... http://www.twitter.com/railshoster
  • 50. How to build a cluster http://www.twitter.com/railshoster
  • 51. How to build a cluster ‣ which components are present? search server, background processing, key/value store, replicating rdbms, ... http://www.twitter.com/railshoster
  • 52. How to build a cluster ‣ which components are present? search server, background processing, key/value store, replicating rdbms, ... ‣ apptired programmers? & quality coded by super geeks or a lot of performance http://www.twitter.com/railshoster
  • 53. How to build a cluster http://www.twitter.com/railshoster
  • 54. How to build a cluster ‣ Do it yourself or full management? http://www.twitter.com/railshoster
  • 55. How to build a cluster ‣ Do it yourself or full management? ‣ admin know how present? Is your team able to care of things like http://www.twitter.com/railshoster
  • 56. How to build a cluster ‣ Do it yourself or full management? ‣ admin know how present? Is your team able to care of things like ‣ os updates http://www.twitter.com/railshoster
  • 57. How to build a cluster ‣ Do it yourself or full management? ‣ admin know how present? Is your team able to care of things like ‣ os updates ‣ web server & load balancer setup http://www.twitter.com/railshoster
  • 58. How to build a cluster ‣ Do it yourself or full management? ‣ admin know how present? Is your team able to care of things like ‣ os updates ‣ web server & load balancer setup ‣ db configuration & tuning http://www.twitter.com/railshoster
  • 59. How to build a cluster ‣ Do it yourself or full management? ‣ admin know how present? Is your team able to care of things like ‣ os updates ‣ web server & load balancer setup ‣ db configuration & tuning ‣ monitoring, ... http://www.twitter.com/railshoster
  • 60. How to build a cluster http://www.twitter.com/railshoster
  • 61. How to build a cluster ‣ Willing to fight with a large number of servers a lot of programmers don‘t want to do both: programming & hosting http://www.twitter.com/railshoster
  • 62. How to build a cluster ‣ Willing to fight with a large number of servers a lot of programmers don‘t want to do both: programming & hosting ‣ Available budget http://www.twitter.com/railshoster
  • 63. How to build a cluster ‣ Willing to fight with a large number of servers a lot of programmers don‘t want to do both: programming & hosting ‣ Available budget ‣ more servers ... more reliability, more performance http://www.twitter.com/railshoster
  • 64. How to build a cluster ‣ Willing to fight with a large number of servers a lot of programmers don‘t want to do both: programming & hosting ‣ Available budget ‣ more servers ... more reliability, more performance ‣ Many other questions ... http://www.twitter.com/railshoster
  • 65. How to build a cluster Choose your HW platform
  • 66. Choose HW plattform http://www.twitter.com/railshoster
  • 67. Choose HW plattform ‣ Physical HW low budget or real server HW? http://www.twitter.com/railshoster
  • 68. Choose HW plattform ‣ Physical HW low budget or real server HW? ‣ Virtual HW Amazon EC2, Joyent, EY, ... http://www.twitter.com/railshoster
  • 69. Choose HW plattform ‣ Physical HW low budget or real server HW? ‣ Virtual HW Amazon EC2, Joyent, EY, ... ‣ Assume we use physical HW ... http://www.twitter.com/railshoster
  • 70. Choose HW plattform http://www.twitter.com/railshoster
  • 71. Choose HW plattform ‣ Compare TCO and performance/€ http://www.twitter.com/railshoster
  • 72. Choose HW plattform ‣ Compare TCO and performance/€ ‣ When is your next scale out? http://www.twitter.com/railshoster
  • 73. Choose HW plattform ‣ Compare TCO and performance/€ ‣ When is your next scale out? ‣ Do you really need to scale within hours? ... and is it worth to pay a lot of extra money? Estimate your resource consumption grow rate e.g. using Munin. http://www.twitter.com/railshoster
  • 74. How to build a cluster Cluster dimensions
  • 75. Cluster dimensions http://www.twitter.com/railshoster
  • 76. Cluster dimensions ‣ How many servers needed? 2, 4, 6, 10, ... http://www.twitter.com/railshoster
  • 77. Cluster dimensions ‣ How many servers needed? 2, 4, 6, 10, ... ‣ Which systems components will be there? App, MA DB, SL DB, BG-Jobs, Search-Server, Memcached, Storage, ... http://www.twitter.com/railshoster
  • 78. Cluster dimensions ‣ How many servers needed? 2, 4, 6, 10, ... ‣ Which systems components will be there? App, MA DB, SL DB, BG-Jobs, Search-Server, Memcached, Storage, ... ‣ Which HW will be most suitable for each individual role? DB Server = a lot of fast hdds, BG-Kob Server = a lot of cpus, ... http://www.twitter.com/railshoster
  • 79. How to build a cluster Cluster design
  • 80. Cluster design http://www.twitter.com/railshoster
  • 81. Cluster design ‣ How to distribute components to servers? http://www.twitter.com/railshoster
  • 82. Cluster design ‣ How to distribute components to servers? ‣ App Server & DB Server together? http://www.twitter.com/railshoster
  • 83. Cluster design ‣ How to distribute components to servers? ‣ App Server & DB Server together? ‣ Dedicated DB Server? http://www.twitter.com/railshoster
  • 84. Cluster design http://www.twitter.com/railshoster
  • 85. Cluster design ‣ Where to put the search server? Sphinx, Solr, ... http://www.twitter.com/railshoster
  • 86. Cluster design ‣ Where to put the search server? Sphinx, Solr, ... ‣ Where to run background jobs? http://www.twitter.com/railshoster
  • 87. Cluster design ‣ Where to put the search server? Sphinx, Solr, ... ‣ Where to run background jobs? ‣ Where to run message queues? See talk of Paolo Negri. http://www.twitter.com/railshoster
  • 88. How to build a cluster Cluster building blocks
  • 90. Network http://www.twitter.com/railshoster
  • 91. Network ‣ Connection between cluster nodes http://www.twitter.com/railshoster
  • 92. Network ‣ Connection between cluster nodes ‣ Use a private (!) physical network http://www.twitter.com/railshoster
  • 93. Network ‣ Connection between cluster nodes ‣ Use a private (!) physical network ‣ Minimize communication latency distribution might cost performance for low load scenarios http://www.twitter.com/railshoster
  • 94. Network ‣ Connection between cluster nodes ‣ Use a private (!) physical network ‣ Minimize communication latency distribution might cost performance for low load scenarios ‣ >= 1even within the same datacenter hosters limit bandwith between servers GBit/s be aware that some http://www.twitter.com/railshoster
  • 95. Cluster building blocks Application Server
  • 96. Application Server http://www.twitter.com/railshoster
  • 97. Application Server ‣ Ruby / Ruby on Rails http://www.twitter.com/railshoster
  • 98. Application Server ‣ Ruby / Ruby on Rails ‣ Passenger our favorite. http://www.twitter.com/railshoster
  • 99. Application Server ‣ Ruby / Ruby on Rails ‣ Passenger our favorite. ‣ LB &&interesting. Thin and mongrel do their job. Unicorn is (Unicorn || Thin || Mongrel) http://www.twitter.com/railshoster
  • 100. Application Server ‣ Ruby / Ruby on Rails ‣ Passenger our favorite. ‣ LB &&interesting. Thin and mongrel do their job. Unicorn is (Unicorn || Thin || Mongrel) ‣ JRuby with Glassfish-Gem or servlet containers like Glassfish-Server, Jetty, Tomacat, ... http://www.twitter.com/railshoster
  • 101. Application Server ‣ Ruby / Ruby on Rails ‣ Passenger our favorite. ‣ LB &&interesting. Thin and mongrel do their job. Unicorn is (Unicorn || Thin || Mongrel) ‣ JRuby with Glassfish-Gem or servlet containers like Glassfish-Server, Jetty, Tomacat, ... ‣ others CGI, fastCGI, SCGI, ... http://www.twitter.com/railshoster
  • 102. Application Server http://www.twitter.com/railshoster
  • 103. Application Server ‣ Python http://www.twitter.com/railshoster
  • 104. Application Server ‣ Python ‣ mod_python run Python interpreter inside apache. http://www.twitter.com/railshoster
  • 105. Application Server ‣ Python ‣ mod_python run Python interpreter inside apache. ‣ mod_wsgi better speed & memory usage than mod_python. http://www.twitter.com/railshoster
  • 106. Application Server ‣ Python ‣ mod_python run Python interpreter inside apache. ‣ mod_wsgi better speed & memory usage than mod_python. ‣ others CGI, fastCGI, SCGI, ... http://www.twitter.com/railshoster
  • 107. Cluster building blocks Load Balancer
  • 108. Load Balancer http://www.twitter.com/railshoster
  • 109. Load Balancer ‣ Most likely not the bottleneck http://www.twitter.com/railshoster
  • 110. Load Balancer ‣ Most likely not the bottleneck ‣ Often a single point of failure (SPOF) http://www.twitter.com/railshoster
  • 111. Load Balancer ‣ Most likely not the bottleneck ‣ Often a single point of failure (SPOF) ‣ Two are better than one! http://www.twitter.com/railshoster
  • 112. Load Balancer ‣ Most likely not the bottleneck ‣ Often a single point of failure (SPOF) ‣ Two are better than one! ‣ What to do if one fails? http://www.twitter.com/railshoster
  • 113. Load Balancer ‣ Most likely not the bottleneck ‣ Often a single point of failure (SPOF) ‣ Two are better than one! ‣ What to do if one fails? ‣ Setup automatic IP failover not possible in every datacenter http://www.twitter.com/railshoster
  • 114. Load Balancer http://www.twitter.com/railshoster
  • 115. Load Balancer ‣ Open Source Software LBs http://www.twitter.com/railshoster
  • 116. Load Balancer ‣ Open Source Software LBs ‣ Apache, NGINX, Pound, HA Proxy, ... http://www.twitter.com/railshoster
  • 117. Load Balancer ‣ Open Source Software LBs ‣ Apache, NGINX, Pound, HA Proxy, ... ‣ LB Appliances BalanceNG, ... http://www.twitter.com/railshoster
  • 119. Storage http://www.twitter.com/railshoster
  • 120. Storage ‣ Use a shared filesystem to store user uploads such as profile pictures, etc. http://www.twitter.com/railshoster
  • 121. Storage ‣ Use a shared filesystem to store user uploads such as profile pictures, etc. ‣ Some storage technologies http://www.twitter.com/railshoster
  • 122. Storage ‣ Use a shared filesystem to store user uploads such as profile pictures, etc. ‣ Some storage technologies ‣ NFS, sync or async, often a SPOF, lot of overhead http://www.twitter.com/railshoster
  • 123. Storage ‣ Use a shared filesystem to store user uploads such as profile pictures, etc. ‣ Some storage technologies ‣ NFS, sync or async, often a SPOF, lot of overhead ‣ RSync, async, replication lag http://www.twitter.com/railshoster
  • 124. Storage ‣ Use a shared filesystem to store user uploads such as profile pictures, etc. ‣ Some storage technologies ‣ NFS, sync or async, often a SPOF, lot of overhead ‣ RSync, async, replication lag ‣ iSCSI && (GFS || OCFS2), incredibly fast http://www.twitter.com/railshoster
  • 126. iSCSI Storage http://www.twitter.com/railshoster
  • 127. iSCSI Storage ‣ iSCSI = SCSI over TCP http://www.twitter.com/railshoster
  • 128. iSCSI Storage ‣ iSCSI = SCSI over TCP ‣ Exports a blockdevice http://www.twitter.com/railshoster
  • 129. iSCSI Storage ‣ iSCSI = SCSI over TCP ‣ Exports a blockdevice ‣ iSCSI = less overhead than NFS http://www.twitter.com/railshoster
  • 130. iSCSI Storage ‣ iSCSI = SCSI over TCP ‣ Exports a blockdevice ‣ iSCSI = less overhead than NFS ‣ Need to use a distributed FS like http://www.twitter.com/railshoster
  • 131. iSCSI Storage ‣ iSCSI = SCSI over TCP ‣ Exports a blockdevice ‣ iSCSI = less overhead than NFS ‣ Need to use a distributed FS like ‣ GFS http://www.twitter.com/railshoster
  • 132. iSCSI Storage ‣ iSCSI = SCSI over TCP ‣ Exports a blockdevice ‣ iSCSI = less overhead than NFS ‣ Need to use a distributed FS like ‣ GFS ‣ OCFS2 http://www.twitter.com/railshoster
  • 134. iSCSI Storage Appliance http://www.twitter.com/railshoster
  • 135. iSCSI Storage Appliance ‣ Think about using a storage appliance, e.g. NetApp http://www.twitter.com/railshoster
  • 136. iSCSI Storage Appliance ‣ Think about using a storage appliance, e.g. NetApp ‣ Has redundant HW http://www.twitter.com/railshoster
  • 137. iSCSI Storage Appliance ‣ Think about using a storage appliance, e.g. NetApp ‣ Has redundant HW ‣ Out of the box solution http://www.twitter.com/railshoster
  • 138. iSCSI Storage Appliance ‣ Think about using a storage appliance, e.g. NetApp ‣ Has redundant HW ‣ Out of the box solution ‣ Very low maintenance http://www.twitter.com/railshoster
  • 139. iSCSI Storage Appliance ‣ Think about using a storage appliance, e.g. NetApp ‣ Has redundant HW ‣ Out of the box solution ‣ Very low maintenance ‣ Connect each app server via dedicated GBit LAN connections http://www.twitter.com/railshoster
  • 141. Database http://www.twitter.com/railshoster
  • 142. Database ‣ RDBMS? There are alternatives CouchDB, MongoDB, ... http://www.twitter.com/railshoster
  • 143. Database ‣ RDBMS? There are alternatives CouchDB, MongoDB, ... ‣ Most likely MySQL, Postgres, ... http://www.twitter.com/railshoster
  • 144. Database ‣ RDBMS? There are alternatives CouchDB, MongoDB, ... ‣ Most likely MySQL, Postgres, ... ‣ Horizontal DB scale out is ugly http://www.twitter.com/railshoster
  • 145. Database ‣ RDBMS? There are alternatives CouchDB, MongoDB, ... ‣ Most likely MySQL, Postgres, ... ‣ Horizontal DB scale out is ugly ‣ Scaleout vertically, first http://www.twitter.com/railshoster
  • 146. Database ‣ RDBMS? There are alternatives CouchDB, MongoDB, ... ‣ Most likely MySQL, Postgres, ... ‣ Horizontal DB scale out is ugly ‣ Scaleout vertically, first ‣ CPU++, RAM++, a lot of fast HDDs http://www.twitter.com/railshoster
  • 147. Horizontal MySQL scaling?
  • 149. Database http://www.twitter.com/railshoster
  • 150. Database ‣ NDB MySQL Cluster http://www.twitter.com/railshoster
  • 151. Database ‣ NDB MySQL Cluster ‣ Features look performance, ... automatic failover, transactions, good write very nice http://www.twitter.com/railshoster
  • 152. Database ‣ NDB MySQL Cluster ‣ Features look performance, ... automatic failover, transactions, good write very nice ‣ At failover advantages. gain least 3 physical maschines needed to http://www.twitter.com/railshoster
  • 153. Database ‣ NDB MySQL Cluster ‣ Features look performance, ... automatic failover, transactions, good write very nice ‣ At failover advantages. gain least 3 physical maschines needed to ‣ Certain joins. such as large statements are incredibly slow http://www.twitter.com/railshoster
  • 154. Database ‣ NDB MySQL Cluster ‣ Features look performance, ... automatic failover, transactions, good write very nice ‣ At failover advantages. gain least 3 physical maschines needed to ‣ Certain joins. such as large statements are incredibly slow ‣ DB sizestored in memory. RAM size since indexed columns are limited by http://www.twitter.com/railshoster
  • 155. Database http://www.twitter.com/railshoster
  • 156. Database ‣ NDB MySQL Cluster http://www.twitter.com/railshoster
  • 157. Database ‣ NDB MySQL Cluster ‣ Only suitable for certain situations http://www.twitter.com/railshoster
  • 158. Database ‣ NDB MySQL Cluster ‣ Only suitable for certain situations ‣ Joins avoided by using a search server solr, sphinx, ... http://www.twitter.com/railshoster
  • 159. Database ‣ NDB MySQL Cluster ‣ Only suitable for certain situations ‣ Joins avoided by using a search server solr, sphinx, ... ‣ Many write transactions but slow data grow rate http://www.twitter.com/railshoster
  • 160. Database ‣ NDB MySQL Cluster ‣ Only suitable for certain situations ‣ Joins avoided by using a search server solr, sphinx, ... ‣ Many write transactions but slow data grow rate ‣ Maybe replication is an alternative ... http://www.twitter.com/railshoster
  • 162. Database http://www.twitter.com/railshoster
  • 163. Database ‣ MA/MA replication http://www.twitter.com/railshoster
  • 164. Database ‣ MA/MA replication ‣ Possible but http://www.twitter.com/railshoster
  • 165. Database ‣ MA/MA replication ‣ Possible but ‣ Not conflicts record recommendable except your app resolves db http://www.twitter.com/railshoster
  • 166. Database http://www.twitter.com/railshoster
  • 167. Database ‣ MA/SL replication http://www.twitter.com/railshoster
  • 168. Database ‣ MA/SL replication ‣ Good starting point http://www.twitter.com/railshoster
  • 169. Database ‣ MA/SL replication ‣ Good starting point ‣ SL = realtime backup of MA DB but http://www.twitter.com/railshoster
  • 170. Database ‣ MA/SL replication ‣ Good starting point ‣ SL = realtime backup of MA DB but ‣ Can be used read-only http://www.twitter.com/railshoster
  • 171. Database ‣ MA/SL replication ‣ Good starting point ‣ SL = realtime backup of MA DB but ‣ Can be used read-only ‣ No automatica failover but manual failoverfor the faster than reinstalling single server. But calculate time is still master reintegration! http://www.twitter.com/railshoster
  • 175. Deployment ‣ Capistrano ‣ Adapt deployment recipe to server and server roles
  • 176. Deployment ‣ Capistrano ‣ Adapt deployment recipe to server and server roles ‣ Initial deployment painful
  • 177. Deployment ‣ Capistrano ‣ Adapt deployment recipe to server and server roles ‣ Initial deployment painful ‣ Further deployments more or less painless
  • 181. Backups ‣ Create automated backups! ‣ Cover filesystem and database
  • 182. Backups ‣ Create automated backups! ‣ Cover filesystem and database ‣ Create them, pack them, encrypt them and upload them to a safe place. e.g. use duplicity!
  • 183. Backups ‣ Create automated backups! ‣ Cover filesystem and database ‣ Create them, pack them, encrypt them and upload them to a safe place. e.g. use duplicity! ‣ Test backups regularily. Broken backups = no backups.
  • 185. „Just because you’re paranoid, doesn’t mean they’re not out to get you.“
  • 186. How does your admin know that something is broken?
  • 188. Nagios
  • 189. Nagios ‣ Nagios monitors key resources of a system. At least it that how it should be configured.
  • 190. Nagios ‣ Nagios monitors key resources of a system. At least it that how it should be configured. ‣ Is some resource not responding or hits a threshold: notify! Again, that‘s how it should be.
  • 191. Nagios ‣ Nagios monitors key resources of a system. At least it that how it should be configured. ‣ Is some resource not responding or hits a threshold: notify! Again, that‘s how it should be. ‣ Also consider using monit for local proactive monitoring issues.
  • 192. Nagios
  • 193. Nagios ‣ What should be checked? List is incomplete.
  • 194. Nagios ‣ What should be checked? List is incomplete. ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow.
  • 195. Nagios ‣ What should be checked? List is incomplete. ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow. ‣ LOAD. More sysload than cores? Processes need to wait.
  • 196. Nagios ‣ What should be checked? List is incomplete. ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow. ‣ LOAD. More sysload than cores? Processes need to wait. ‣ HTTP. Webserver, are you still there?
  • 197. Nagios ‣ What should be checked? List is incomplete. ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow. ‣ LOAD. More sysload than cores? Processes need to wait. ‣ HTTP. Webserver, are you still there? ‣ APP. Does my app still serve my control string XY?
  • 198. Nagios ‣ What should be checked? List is incomplete. ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow. ‣ LOAD. More sysload than cores? Processes need to wait. ‣ HTTP. Webserver, are you still there? ‣ APP. Does my app still serve my control string XY? ‣ and a lot more!
  • 203. Resource History ‣ Stores the consumption of individual resources over time.
  • 204. Resource History ‣ Stores the consumption of individual resources over time. ‣ Trend analysis. What happened after the last puplicity ploy on our servers?
  • 205. Resource History ‣ Stores the consumption of individual resources over time. ‣ Trend analysis. What happened after the last puplicity ploy on our servers? ‣ Scale out needed? Or maybe in a month?
  • 206. Resource History ‣ Stores the consumption of individual resources over time. ‣ Trend analysis. What happened after the last puplicity ploy on our servers? ‣ Scale out needed? Or maybe in a month? ‣ Does my app leak?
  • 209. Maintenance ‣ OS updates. updates. Minor-, major-, distro
  • 210. Maintenance ‣ OS updates. updates. Minor-, major-, distro ‣ Take a server out of the cluster to perform bigger updates. Reintegrate if afterwards. No or minor service impact.
  • 211. Maintenance ‣ OS updates. updates. Minor-, major-, distro ‣ Take a server out of the cluster to perform bigger updates. Reintegrate if afterwards. No or minor service impact. ‣ Ruby Updates. Ruby, Rails, Gems, ...
  • 212. Maintenance ‣ OS updates. updates. Minor-, major-, distro ‣ Take a server out of the cluster to perform bigger updates. Reintegrate if afterwards. No or minor service impact. ‣ Ruby Updates. Ruby, Rails, Gems, ... ‣ Rotation and monitoring of logs. Bad things going on?
  • 213. Maintenance ‣ OS updates. updates. Minor-, major-, distro ‣ Take a server out of the cluster to perform bigger updates. Reintegrate if afterwards. No or minor service impact. ‣ Ruby Updates. Ruby, Rails, Gems, ... ‣ Rotation and monitoring of logs. Bad things going on? ‣ Check your backups!
  • 214. Maintenance ‣ OS updates. updates. Minor-, major-, distro ‣ Take a server out of the cluster to perform bigger updates. Reintegrate if afterwards. No or minor service impact. ‣ Ruby Updates. Ruby, Rails, Gems, ... ‣ Rotation and monitoring of logs. Bad things going on? ‣ Check your backups! ‣ ...
  • 215. Fazit Ok, nice to know but ...
  • 216. Fazit ... who the hell should to do all those things and additionally develop an application?
  • 217.
  • 218. Thank you for your attention! Headquarter: Rails Enterprise Hosting: http://www.avarteq.de http://www.enterprise- rails.de Blog: http://ww.treibstofff.de Rails Hosting: http://www.railshoster.de
  • 219. Resources http://www.twitter.com/railshoster
  • 220. Resources ‣ Python Web Application Hosting http://hostingfu.com/article/python-web-application-hosting http://www.twitter.com/railshoster
  • 221. Resources ‣ Python Web Application Hosting http://hostingfu.com/article/python-web-application-hosting ‣ Apache and mod_wsgi http://djangoinproduction.com/wiki/Apache_and_mod_wsgi http://www.twitter.com/railshoster
  • 222. Resources ‣ Python Web Application Hosting http://hostingfu.com/article/python-web-application-hosting ‣ Apache and mod_wsgi http://djangoinproduction.com/wiki/Apache_and_mod_wsgi ‣ MySQL Cluster http://www.mysql.com/products/database/cluster/ http://www.twitter.com/railshoster
  • 223. Resources ‣ Python Web Application Hosting http://hostingfu.com/article/python-web-application-hosting ‣ Apache and mod_wsgi http://djangoinproduction.com/wiki/Apache_and_mod_wsgi ‣ MySQL Cluster http://www.mysql.com/products/database/cluster/ ‣ Duplicity Backup Tool http://duplicity.nongnu.org/ http://www.twitter.com/railshoster

Editor's Notes

  1. diff to non enterprise hosting
  2. components -&gt; influence on how to distribute your components to servers &amp;&amp; how many &amp;&amp; which servers to choose
  3. components -&gt; influence on how to distribute your components to servers &amp;&amp; how many &amp;&amp; which servers to choose
  4. lets assume physical HW
  5. lets assume physical HW
  6. lets assume physical HW
  7. We provide storage space on shared NetApps
  8. We provide storage space on shared NetApps
  9. We provide storage space on shared NetApps
  10. We provide storage space on shared NetApps
  11. We provide storage space on shared NetApps
  12. We provide storage space on shared NetApps
  13. We provide storage space on shared NetApps
  14. We provide storage space on shared NetApps
  15. We provide storage space on shared NetApps
  16. wsgi = the way to go, updated frequently mod_python
  17. wsgi = the way to go, updated frequently mod_python
  18. wsgi = the way to go, updated frequently mod_python
  19. wsgi = the way to go, updated frequently mod_python
  20. distributed FS because multiple nodes write to a single block device.
  21. distributed FS because multiple nodes write to a single block device.
  22. distributed FS because multiple nodes write to a single block device.
  23. distributed FS because multiple nodes write to a single block device.
  24. distributed FS because multiple nodes write to a single block device.
  25. distributed FS because multiple nodes write to a single block device.
  26. We provide storage space on shared NetApps
  27. We provide storage space on shared NetApps
  28. We provide storage space on shared NetApps
  29. We provide storage space on shared NetApps
  30. We provide storage space on shared NetApps
  31. Further focus on MySQL
  32. Further focus on MySQL
  33. Further focus on MySQL
  34. Further focus on MySQL
  35. Further focus on MySQL
  36. Further focus on MySQL
  37. Further focus on MySQL
  38. Further focus on MySQL
  39. Further focus on MySQL
  40. Further focus on MySQL
  41. Further focus on MySQL
  42. Further focus on MySQL
  43. Further focus on MySQL
  44. Further focus on MySQL
  45. Further focus on MySQL
  46. Further focus on MySQL
  47. Further focus on MySQL
  48. Further focus on MySQL
  49. Further focus on MySQL
  50. Further focus on MySQL
  51. Further focus on MySQL
  52. Further focus on MySQL
  53. Further focus on MySQL
  54. Kurzer R&amp;#xFC;ckblick -&gt; Anwendung l&amp;#xE4;uft jetzt.
  55. Kurzer R&amp;#xFC;ckblick -&gt; Anwendung l&amp;#xE4;uft jetzt.
  56. Kurzer R&amp;#xFC;ckblick -&gt; Anwendung l&amp;#xE4;uft jetzt.
  57. Kurzer R&amp;#xFC;ckblick -&gt; Anwendung l&amp;#xE4;uft jetzt.
  58. Nicht immer ist es Server-Versagen. Hacker, Anwendungsfehler --&gt; Datenverlust
  59. HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &amp;#xFC;bersicht verlieren.
  60. HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &amp;#xFC;bersicht verlieren.
  61. HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &amp;#xFC;bersicht verlieren.
  62. HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &amp;#xFC;bersicht verlieren.
  63. HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &amp;#xFC;bersicht verlieren.
  64. HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &amp;#xFC;bersicht verlieren.
  65. Useraufuchs + Kurze Zusammenfassung: app l&amp;#xE4;uft, backup + monitoring. soll auch so bleiben!
  66. Useraufuchs + Kurze Zusammenfassung: app l&amp;#xE4;uft, backup + monitoring. soll auch so bleiben!
  67. Useraufuchs + Kurze Zusammenfassung: app l&amp;#xE4;uft, backup + monitoring. soll auch so bleiben!
  68. Useraufuchs + Kurze Zusammenfassung: app l&amp;#xE4;uft, backup + monitoring. soll auch so bleiben!
  69. Kernelupdates -&gt; Downtime, Dis Update weil Support ausl&amp;#xE4;uft Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum k&amp;#xFC;mmert
  70. Kernelupdates -&gt; Downtime, Dis Update weil Support ausl&amp;#xE4;uft Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum k&amp;#xFC;mmert
  71. Kernelupdates -&gt; Downtime, Dis Update weil Support ausl&amp;#xE4;uft Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum k&amp;#xFC;mmert
  72. Kernelupdates -&gt; Downtime, Dis Update weil Support ausl&amp;#xE4;uft Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum k&amp;#xFC;mmert
  73. Kernelupdates -&gt; Downtime, Dis Update weil Support ausl&amp;#xE4;uft Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum k&amp;#xFC;mmert
  74. Kernelupdates -&gt; Downtime, Dis Update weil Support ausl&amp;#xE4;uft Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum k&amp;#xFC;mmert
  75. Trennung der Verantwortlichkeiten, Hosting Team, Dev-Team, h&amp;#xF6;here Produktivit&amp;#xE4;t.