SlideShare a Scribd company logo
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?
Enterprise Hosting
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

PDF
SANS 2015 - Superbees Wanted
PPSX
SANS 2014 - Superbees Wanted
PDF
Magento scalability from the trenches (Meet Magento Sweden 2016)
PPTX
Anthony Somerset - Site Speed = Success!
PDF
Here Be Dragons - Debugging WordPress
PDF
Professional Workflow from Development to Deployment
PDF
Nate Reist WCGR WP AJAX presentation
PPTX
WordPress performance tuning
SANS 2015 - Superbees Wanted
SANS 2014 - Superbees Wanted
Magento scalability from the trenches (Meet Magento Sweden 2016)
Anthony Somerset - Site Speed = Success!
Here Be Dragons - Debugging WordPress
Professional Workflow from Development to Deployment
Nate Reist WCGR WP AJAX presentation
WordPress performance tuning

What's hot (20)

PDF
Nürnberg WooCommerce Talk - 11/24/16
PDF
WordPress London Developer Operations For Beginners
PPTX
My Database Skills Killed the Server
PDF
Carrying Enterprise on a Little Camel
PDF
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
PDF
How to investigate and recover from a security breach in WordPress
PDF
Local development with vvv jon trujillo
PDF
CIRCUIT 2015 - Monitoring AEM
PPT
MySQL crash course by moshe kaplan
PDF
Create rails project
PPTX
Introduction to-ict
PDF
10 common cf server challenges
PDF
WordCamp Belfast DevOps for Beginners
PDF
PHPDay 2013 - High Performance PHP
PDF
Use Xdebug to profile PHP
PDF
Fundamentals of TempDB
ZIP
High Performance WordPress - WordCamp Jerusalem 2010
PDF
Running and Scaling Magento on AWS
PDF
Search in WordPress - how it works and howto customize it
PDF
Edge 2016 service workers and other front end techniques
Nürnberg WooCommerce Talk - 11/24/16
WordPress London Developer Operations For Beginners
My Database Skills Killed the Server
Carrying Enterprise on a Little Camel
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
Local development with vvv jon trujillo
CIRCUIT 2015 - Monitoring AEM
MySQL crash course by moshe kaplan
Create rails project
Introduction to-ict
10 common cf server challenges
WordCamp Belfast DevOps for Beginners
PHPDay 2013 - High Performance PHP
Use Xdebug to profile PHP
Fundamentals of TempDB
High Performance WordPress - WordCamp Jerusalem 2010
Running and Scaling Magento on AWS
Search in WordPress - how it works and howto customize it
Edge 2016 service workers and other front end techniques
Ad

Similar to Enterprise Hosting (20)

PPT
How To Scale v2
PDF
Scalable Architecture on Amazon AWS Cloud - Indicthreads cloud computing conf...
PPS
Scalable Web Arch
PPS
Scalable Web Architectures - Common Patterns & Approaches
PDF
How to Build a Compute Cluster
PDF
A scalable server environment for your applications
PDF
Joyent circa 2006 (Scale with Rails)
PPS
Web20expo Scalable Web Arch
PPS
Web20expo Scalable Web Arch
PPS
Web20expo Scalable Web Arch
ODP
MNPHP Scalable Architecture 101 - Feb 3 2011
PDF
Scaling WordPress for High Traffic - Server Architecture
KEY
Cloud Computing & Scaling Web Apps
PPTX
Cloud computing & lamp applications
KEY
Dibi Conference 2012
PPT
How to scale your web app
PPTX
Architecting extremelylarge scale web applications
PDF
DockerCon14 Cluster Management and Containerization
PDF
EOUG95 - Client Server Very Large Databases - Presentation
PDF
CouchConf SF 2012 Lightning Talk - Operational Excellence
How To Scale v2
Scalable Architecture on Amazon AWS Cloud - Indicthreads cloud computing conf...
Scalable Web Arch
Scalable Web Architectures - Common Patterns & Approaches
How to Build a Compute Cluster
A scalable server environment for your applications
Joyent circa 2006 (Scale with Rails)
Web20expo Scalable Web Arch
Web20expo Scalable Web Arch
Web20expo Scalable Web Arch
MNPHP Scalable Architecture 101 - Feb 3 2011
Scaling WordPress for High Traffic - Server Architecture
Cloud Computing & Scaling Web Apps
Cloud computing & lamp applications
Dibi Conference 2012
How to scale your web app
Architecting extremelylarge scale web applications
DockerCon14 Cluster Management and Containerization
EOUG95 - Client Server Very Large Databases - Presentation
CouchConf SF 2012 Lightning Talk - Operational Excellence
Ad

More from Avarteq (20)

PPTX
Kanban - Classes of Service
PPTX
Kanban - Set Work in Progress Limits
PPTX
Kanban - Set a pace for the input
PPTX
Kanban – Visualizing the value chain
PPTX
Kanban - Establish a Delivery Rhythm
PPTX
Kanban - How to coordinate with Kanban
PPTX
Kanban: Kaizen - Culture of continuous improvement
PPTX
Kanban - Extreme improvements in five quarters
PPTX
Kanban - A recipe for success
PPTX
The Kanban method
PPTX
Kanban: The Dilemma of an Agile Manager
PDF
Ruby Grundlagen
KEY
Opscode Chef - Grundlagen
KEY
Einführung in Opscode Chef - Voraussetzungen
KEY
RabbitMQ mit (J)Ruby
KEY
JRuby
PDF
Enterprise rails hosting 3 ways to scale - 2011-10
KEY
Julian Fischer Ruby On Rails
KEY
Mehrserver Lösungen
KEY
Evolutionary Algorithms In Ruby
Kanban - Classes of Service
Kanban - Set Work in Progress Limits
Kanban - Set a pace for the input
Kanban – Visualizing the value chain
Kanban - Establish a Delivery Rhythm
Kanban - How to coordinate with Kanban
Kanban: Kaizen - Culture of continuous improvement
Kanban - Extreme improvements in five quarters
Kanban - A recipe for success
The Kanban method
Kanban: The Dilemma of an Agile Manager
Ruby Grundlagen
Opscode Chef - Grundlagen
Einführung in Opscode Chef - Voraussetzungen
RabbitMQ mit (J)Ruby
JRuby
Enterprise rails hosting 3 ways to scale - 2011-10
Julian Fischer Ruby On Rails
Mehrserver Lösungen
Evolutionary Algorithms In Ruby

Recently uploaded (20)

PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
cuic standard and advanced reporting.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
KodekX | Application Modernization Development
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation theory and applications.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Modernizing your data center with Dell and AMD
PDF
Electronic commerce courselecture one. Pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
A Presentation on Artificial Intelligence
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Cloud computing and distributed systems.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
cuic standard and advanced reporting.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Understanding_Digital_Forensics_Presentation.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
KodekX | Application Modernization Development
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation theory and applications.pdf
Big Data Technologies - Introduction.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Modernizing your data center with Dell and AMD
Electronic commerce courselecture one. Pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
A Presentation on Artificial Intelligence
Chapter 3 Spatial Domain Image Processing.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Review of recent advances in non-invasive hemoglobin estimation
Cloud computing and distributed systems.

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?
  • 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

  • #20: diff to non enterprise hosting
  • #44: components -&gt; influence on how to distribute your components to servers &amp;&amp; how many &amp;&amp; which servers to choose
  • #45: components -&gt; influence on how to distribute your components to servers &amp;&amp; how many &amp;&amp; which servers to choose
  • #60: lets assume physical HW
  • #61: lets assume physical HW
  • #62: lets assume physical HW
  • #76: We provide storage space on shared NetApps
  • #77: We provide storage space on shared NetApps
  • #78: We provide storage space on shared NetApps
  • #79: We provide storage space on shared NetApps
  • #81: We provide storage space on shared NetApps
  • #82: We provide storage space on shared NetApps
  • #83: We provide storage space on shared NetApps
  • #84: We provide storage space on shared NetApps
  • #85: We provide storage space on shared NetApps
  • #86: wsgi = the way to go, updated frequently mod_python
  • #87: wsgi = the way to go, updated frequently mod_python
  • #88: wsgi = the way to go, updated frequently mod_python
  • #89: wsgi = the way to go, updated frequently mod_python
  • #106: distributed FS because multiple nodes write to a single block device.
  • #107: distributed FS because multiple nodes write to a single block device.
  • #108: distributed FS because multiple nodes write to a single block device.
  • #109: distributed FS because multiple nodes write to a single block device.
  • #110: distributed FS because multiple nodes write to a single block device.
  • #111: distributed FS because multiple nodes write to a single block device.
  • #113: We provide storage space on shared NetApps
  • #114: We provide storage space on shared NetApps
  • #115: We provide storage space on shared NetApps
  • #116: We provide storage space on shared NetApps
  • #117: We provide storage space on shared NetApps
  • #119: Further focus on MySQL
  • #120: Further focus on MySQL
  • #121: Further focus on MySQL
  • #122: Further focus on MySQL
  • #123: Further focus on MySQL
  • #126: Further focus on MySQL
  • #127: Further focus on MySQL
  • #128: Further focus on MySQL
  • #129: Further focus on MySQL
  • #130: Further focus on MySQL
  • #131: Further focus on MySQL
  • #132: Further focus on MySQL
  • #133: Further focus on MySQL
  • #134: Further focus on MySQL
  • #135: Further focus on MySQL
  • #137: Further focus on MySQL
  • #138: Further focus on MySQL
  • #139: Further focus on MySQL
  • #140: Further focus on MySQL
  • #141: Further focus on MySQL
  • #142: Further focus on MySQL
  • #143: Further focus on MySQL
  • #144: Further focus on MySQL
  • #146: Kurzer R&amp;#xFC;ckblick -&gt; Anwendung l&amp;#xE4;uft jetzt.
  • #147: Kurzer R&amp;#xFC;ckblick -&gt; Anwendung l&amp;#xE4;uft jetzt.
  • #148: Kurzer R&amp;#xFC;ckblick -&gt; Anwendung l&amp;#xE4;uft jetzt.
  • #149: Kurzer R&amp;#xFC;ckblick -&gt; Anwendung l&amp;#xE4;uft jetzt.
  • #150: Nicht immer ist es Server-Versagen. Hacker, Anwendungsfehler --&gt; Datenverlust
  • #162: HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &amp;#xFC;bersicht verlieren.
  • #163: HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &amp;#xFC;bersicht verlieren.
  • #164: HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &amp;#xFC;bersicht verlieren.
  • #165: HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &amp;#xFC;bersicht verlieren.
  • #166: HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &amp;#xFC;bersicht verlieren.
  • #167: HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &amp;#xFC;bersicht verlieren.
  • #170: Useraufuchs + Kurze Zusammenfassung: app l&amp;#xE4;uft, backup + monitoring. soll auch so bleiben!
  • #171: Useraufuchs + Kurze Zusammenfassung: app l&amp;#xE4;uft, backup + monitoring. soll auch so bleiben!
  • #172: Useraufuchs + Kurze Zusammenfassung: app l&amp;#xE4;uft, backup + monitoring. soll auch so bleiben!
  • #173: Useraufuchs + Kurze Zusammenfassung: app l&amp;#xE4;uft, backup + monitoring. soll auch so bleiben!
  • #175: 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
  • #176: 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
  • #177: 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
  • #178: 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
  • #179: 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
  • #180: 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
  • #183: Trennung der Verantwortlichkeiten, Hosting Team, Dev-Team, h&amp;#xF6;here Produktivit&amp;#xE4;t.