Enterprise Hosting
    for Ruby and Python




             Julian Fischer
      fischer@enterprise-rails.de
    http://ww...
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....
About me
       Julian Fischer
       ‣Twitter: http://www.twitter.com/railshoster
       ‣E-Mail: fischer@enterprise-rail...
About me
       Julian Fischer
       ‣Twitter: http://www.twitter.com/railshoster
       ‣E-Mail: fischer@enterprise-rail...
About me
        Julian Fischer
       ‣Twitter: http://www.twitter.com/railshoster
       ‣E-Mail: fischer@enterprise-rai...
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/rails...
About Avarteq GmbH


‣ Founded in Nov. 2008
  from two existing companies.



‣ Involvment of Key-Systems GmbH
  manages ~...
About Avarteq GmbH


‣ Founded in Nov. 2008
  from two existing companies.



‣ Involvment of Key-Systems GmbH
  manages ~...
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/railshost...
About Avarteq GmbH


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




          ...
About Avarteq GmbH


‣ Covers all stages of web development
 ‣ Consulting
 ‣ Conceptual ~ and screen design
 ‣ Ruby&onplac...
About Avarteq GmbH


‣ Covers all stages of web development
 ‣ Consulting
 ‣ Conceptual ~ and screen design
 ‣ Ruby&onplac...
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



               ...
EH - Basic Idea


‣ Given
 ‣ Python / Ruby / Rails App
‣ Needed
 ‣ Max. availability ideal: 100% uptime
 ‣ Acceptable perf...
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.c...
EH - Obstacles


‣ Single server = a lot of SPOFs
‣ Multiple servers = a lot of work
‣ Eliminating SPOFs is not easy/possi...
How to build a
fancy & rockin‘
   cluster?
Cluster Building Blocks


  Monitoring
  DBApp
   Backups
   Storage
     MA/SL
     LB




               Enterprise
    ...
Cluster Building Blocks


  Monitoring
  DB MA/SL
   Backups
   Storage
     LB




                  App
               E...
Cluster Building Blocks


  Monitoring
  DB MA/SL
   Backups
   Storage




                  App
                   LB
  ...
Cluster Building Blocks


  Monitoring
  DB MA/SL
   Backups




                Storage
                  App
           ...
Cluster Building Blocks


  Monitoring
   Backups




               DBApp
                Storage
                   MA/S...
Cluster Building Blocks


  Monitoring




               DBApp
                Backups
                Storage
          ...
Cluster Building Blocks




               Monitoring
               DBApp
                Backups
                Storage...
Cluster Building Blocks




               Monitoring
               DBApp
                Backups
                Storage...
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.t...
How to build a cluster


‣ desired response time which again depends on several
  factors



  ‣ average load e.g. on a cl...
How to build a cluster


‣ desired response time which again depends on several
  factors



  ‣ average load e.g. on a cl...
How to build a cluster


‣ desired response time which again depends on several
  factors



  ‣ average load e.g. on a cl...
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, replicat...
How to build a cluster


‣ which components are present? search server,
  background processing, key/value store, replicat...
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 t...
How to build a cluster


‣ Do it yourself or full management?
 ‣ admin know how present?
   Is your team able to care of t...
How to build a cluster


‣ Do it yourself or full management?
 ‣ admin know how present?
   Is your team able to care of t...
How to build a cluster


‣ Do it yourself or full management?
 ‣ admin know how present?
   Is your team able to care of t...
How to build a cluster


‣ Do it yourself or full management?
 ‣ admin know how present?
   Is your team able to care of t...
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: p...
How to build a cluster


‣ Willing to fight with a large number of
  servers a lot of programmers don‘t want to do both: p...
How to build a cluster


‣ Willing to fight with a large number of
  servers a lot of programmers don‘t want to do both: p...
How to build a cluster


‣ Willing to fight with a large number of
  servers a lot of programmers don‘t want to do both: p...
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, ...




           ...
Choose HW plattform


‣ Physical HW low budget or real server HW?
‣ Virtual HW Amazon EC2, Joyent, EY, ...
‣ Assume we use...
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.co...
Choose HW plattform


‣ Compare TCO and performance/€
‣ When is your next scale out?
‣ Do you really need to scale within
...
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, S...
Cluster dimensions


‣ How many servers needed? 2, 4, 6, 10, ...
‣ Which systems components will be there?
  App, MA DB, S...
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...
Cluster design


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


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




         ...
Cluster design


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



 ‣ Where to run background jobs?
 ‣ Where to r...
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/...
Network


‣ Connection between cluster nodes
‣ Use a private (!) physical network
‣ Minimize communication latency distrib...
Network


‣ Connection between cluster nodes
‣ Use a private (!) physical network
‣ Minimize communication latency distrib...
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/railshost...
Application Server


‣ Ruby / Ruby on Rails
 ‣ Passenger our favorite.
 ‣ LB &&interesting. Thin and mongrel do their job....
Application Server


‣ Ruby / Ruby on Rails
 ‣ Passenger our favorite.
 ‣ LB &&interesting. Thin and mongrel do their job....
Application Server


‣ Ruby / Ruby on Rails
 ‣ Passenger our favorite.
 ‣ LB &&interesting. Thin and mongrel do their job....
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.c...
Application Server


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


‣ Python
 ‣ mod_python run Python interpreter inside apache.
 ‣ mod_wsgi better speed & memory usage ...
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.twit...
Load Balancer


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




 ...
Load Balancer


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


‣ Most likely not the bottleneck
‣ Often a single point of failure (SPOF)
‣ Two are better than one!
‣ Wha...
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/ra...
Load Balancer


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




    ...
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://w...
Storage


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

‣ Some storage technologies


...
Storage


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

‣ Some storage technologies
 ‣...
Storage


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

‣ Some storage technologies
 ‣...
Storage


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

‣ Some storage technologies
 ‣...
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://ww...
iSCSI Storage


‣ iSCSI = SCSI over TCP
‣ Exports a blockdevice
‣ iSCSI = less overhead than NFS
‣ Need to use a distribut...
iSCSI Storage


‣ iSCSI = SCSI over TCP
‣ Exports a blockdevice
‣ iSCSI = less overhead than NFS
‣ Need to use a distribut...
iSCSI Storage


‣ iSCSI = SCSI over TCP
‣ Exports a blockdevice
‣ iSCSI = less overhead than NFS
‣ Need to use a distribut...
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/r...
iSCSI Storage Appliance


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



 ‣ Has redundant HW




             h...
iSCSI Storage Appliance


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



 ‣ Has redundant HW
 ‣ Out of the box ...
iSCSI Storage Appliance


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



 ‣ Has redundant HW
 ‣ Out of the box ...
iSCSI Storage Appliance


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



 ‣ Has redundant HW
 ‣ Out of the box ...
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, ...




                  ...
Database


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


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


‣ RDBMS? There are alternatives CouchDB, MongoDB, ...
‣ Most likely MySQL, Postgres, ...
‣ Horizontal DB scale ...
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
         ...
Database


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


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


‣ NDB MySQL Cluster
 ‣ Features look performance, ... automatic failover,
   transactions, good write
         ...
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
     so...
Database


‣ NDB MySQL Cluster
 ‣ Only suitable for certain situations
   ‣ Joins avoided by using a search server
     so...
Database


‣ NDB MySQL Cluster
 ‣ Only suitable for certain situations
   ‣ Joins avoided by using a search server
     so...
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...
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.tw...
Database


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


...
Database


‣ MA/SL replication
 ‣ Good starting point
   ‣ SL = realtime backup of MA DB but
   ‣ Can be used read-only
  ...
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...
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 ...
Backups


‣ Create automated backups!
‣ Cover filesystem and database
‣ Create them, pack them, encrypt them
  and upload ...
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 ...
Nagios


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

‣ Is some resourc...
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....
Nagios


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


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


‣ What should be checked? List is incomplete.
  ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow.
  ‣ LOAD....
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 t...
Resource History


‣ Stores the consumption of individual
   resources over time.

‣ Trend analysis. What happened after t...
Resource History


‣ Stores the consumption of individual
   resources over time.

‣ Trend analysis. What happened after t...
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 u...
Maintenance


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


  ‣   Take a server out of the cluster to perform bigger u...
Maintenance


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


  ‣   Take a server out of the cluster to perform bigger u...
Maintenance


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


  ‣   Take a server out of the cluster to perform bigger u...
Maintenance


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


  ‣     Take a server out of the cluster to perform bigger...
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 Ho...
Resources




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

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




        ...
Resources

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


‣   Apache...
Resources

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


‣   Apache...
Resources

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


‣   Apache...
Enterprise Hosting
Upcoming SlideShare
Loading in …5
×

Enterprise Hosting

1,774
-1

Published on

This talk is about how to build a cluster to run a python or ruby (ruby on rails) application. We'll have a look at how the procedure of building such a cluster could look like and what you should take into consideration.
We'll look at issues like: datacenter, networking, load balancing, storage, database replication, ....

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,774
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
41
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide
  • diff to non enterprise hosting
  • components -> influence on how to distribute your components to servers &&
    how many && which servers to choose
  • components -> influence on how to distribute your components to servers &&
    how many && which servers to choose
  • lets assume physical HW
  • lets assume physical HW
  • lets assume physical HW
  • We provide storage space on shared NetApps
  • We provide storage space on shared NetApps
  • We provide storage space on shared NetApps
  • We provide storage space on shared NetApps
  • We provide storage space on shared NetApps
  • We provide storage space on shared NetApps
  • We provide storage space on shared NetApps
  • We provide storage space on shared NetApps
  • We provide storage space on shared NetApps
  • wsgi = the way to go, updated frequently
    mod_python
  • wsgi = the way to go, updated frequently
    mod_python
  • wsgi = the way to go, updated frequently
    mod_python
  • wsgi = the way to go, updated frequently
    mod_python
  • distributed FS because multiple nodes write to a single block device.
  • distributed FS because multiple nodes write to a single block device.
  • distributed FS because multiple nodes write to a single block device.
  • distributed FS because multiple nodes write to a single block device.
  • distributed FS because multiple nodes write to a single block device.
  • distributed FS because multiple nodes write to a single block device.
  • We provide storage space on shared NetApps
  • We provide storage space on shared NetApps
  • We provide storage space on shared NetApps
  • We provide storage space on shared NetApps
  • We provide storage space on shared NetApps
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Further focus on MySQL
  • Kurzer Rückblick -> Anwendung läuft jetzt.
  • Kurzer Rückblick -> Anwendung läuft jetzt.
  • Kurzer Rückblick -> Anwendung läuft jetzt.
  • Kurzer Rückblick -> Anwendung läuft jetzt.
  • Nicht immer ist es Server-Versagen. Hacker, Anwendungsfehler --> Datenverlust
  • HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down.
    Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst übersicht verlieren.
  • HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down.
    Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst übersicht verlieren.
  • HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down.
    Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst übersicht verlieren.
  • HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down.
    Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst übersicht verlieren.
  • HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down.
    Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst übersicht verlieren.
  • HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down.
    Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst übersicht verlieren.
  • Useraufuchs + Kurze Zusammenfassung: app läuft, backup + monitoring. soll auch so bleiben!
  • Useraufuchs + Kurze Zusammenfassung: app läuft, backup + monitoring. soll auch so bleiben!
  • Useraufuchs + Kurze Zusammenfassung: app läuft, backup + monitoring. soll auch so bleiben!
  • Useraufuchs + Kurze Zusammenfassung: app läuft, backup + monitoring. soll auch so bleiben!
  • Kernelupdates -> Downtime, Dis Update weil Support ausläuft
    Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum kümmert
  • Kernelupdates -> Downtime, Dis Update weil Support ausläuft
    Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum kümmert
  • Kernelupdates -> Downtime, Dis Update weil Support ausläuft
    Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum kümmert
  • Kernelupdates -> Downtime, Dis Update weil Support ausläuft
    Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum kümmert
  • Kernelupdates -> Downtime, Dis Update weil Support ausläuft
    Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum kümmert
  • Kernelupdates -> Downtime, Dis Update weil Support ausläuft
    Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum kümmert
  • Trennung der Verantwortlichkeiten, Hosting Team, Dev-Team, höhere Produktivität.
  • Enterprise Hosting

    1. 1. Enterprise Hosting for Ruby and Python Julian Fischer fischer@enterprise-rails.de http://www.enterprise-rails.de
    2. 2. Introduction
    3. 3. Introduction About me
    4. 4. About me Julian Fischer ‣Twitter: http://www.twitter.com/railshoster ‣E-Mail: fischer@enterprise-rails.de
    5. 5. About me Julian Fischer ‣Twitter: http://www.twitter.com/railshoster ‣E-Mail: fischer@enterprise-rails.de ‣ CEO of Avarteq GmbH
    6. 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. 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. 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
    9. 9. Introduction About Avarteq GmbH
    10. 10. About Avarteq GmbH http://www.twitter.com/railshoster
    11. 11. About Avarteq GmbH ‣ Founded in Nov. 2008 from two existing companies. http://www.twitter.com/railshoster
    12. 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. 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
    14. 14. Introduction Portfolio
    15. 15. About Avarteq GmbH http://www.twitter.com/railshoster
    16. 16. About Avarteq GmbH ‣ Covers all stages of web development http://www.twitter.com/railshoster
    17. 17. About Avarteq GmbH ‣ Covers all stages of web development ‣ Consulting http://www.twitter.com/railshoster
    18. 18. About Avarteq GmbH ‣ Covers all stages of web development ‣ Consulting ‣ Conceptual ~ and screen design http://www.twitter.com/railshoster
    19. 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. 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
    21. 21. Enterprise Hosting
    22. 22. Enterprise Hosting Situation
    23. 23. EH - Basic Idea http://www.twitter.com/railshoster
    24. 24. EH - Basic Idea ‣ Given http://www.twitter.com/railshoster
    25. 25. EH - Basic Idea ‣ Given ‣ Python / Ruby / Rails App http://www.twitter.com/railshoster
    26. 26. EH - Basic Idea ‣ Given ‣ Python / Ruby / Rails App ‣ Needed http://www.twitter.com/railshoster
    27. 27. EH - Basic Idea ‣ Given ‣ Python / Ruby / Rails App ‣ Needed ‣ Max. availability ideal: 100% uptime http://www.twitter.com/railshoster
    28. 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. 29. Enterprise Hosting Obstacles
    30. 30. EH - Obstacles http://www.twitter.com/railshoster
    31. 31. EH - Obstacles ‣ Single server = a lot of SPOFs http://www.twitter.com/railshoster
    32. 32. EH - Obstacles ‣ Single server = a lot of SPOFs ‣ Multiple servers = a lot of work http://www.twitter.com/railshoster
    33. 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. 34. How to build a fancy & rockin‘ cluster?
    35. 35. Cluster Building Blocks Monitoring DBApp Backups Storage MA/SL LB Enterprise Cluster
    36. 36. Cluster Building Blocks Monitoring DB MA/SL Backups Storage LB App Enterprise Cluster
    37. 37. Cluster Building Blocks Monitoring DB MA/SL Backups Storage App LB Enterprise Cluster
    38. 38. Cluster Building Blocks Monitoring DB MA/SL Backups Storage App LB Enterprise Cluster
    39. 39. Cluster Building Blocks Monitoring Backups DBApp Storage MA/SL LB Enterprise Cluster
    40. 40. Cluster Building Blocks Monitoring DBApp Backups Storage MA/SL LB Enterprise Cluster
    41. 41. Cluster Building Blocks Monitoring DBApp Backups Storage MA/SL LB Enterprise Cluster
    42. 42. Cluster Building Blocks Monitoring DBApp Backups Storage MA/SL LB Enterprise Cluster ✓
    43. 43. maybe it‘s not that easy :)
    44. 44. How to build a cluster Requirements Analysis
    45. 45. How to build a cluster http://www.twitter.com/railshoster
    46. 46. How to build a cluster ‣ desired response time which again depends on several factors http://www.twitter.com/railshoster
    47. 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. 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. 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. 50. How to build a cluster http://www.twitter.com/railshoster
    51. 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. 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. 53. How to build a cluster http://www.twitter.com/railshoster
    54. 54. How to build a cluster ‣ Do it yourself or full management? http://www.twitter.com/railshoster
    55. 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. 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. 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. 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. 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. 60. How to build a cluster http://www.twitter.com/railshoster
    61. 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. 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. 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. 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. 65. How to build a cluster Choose your HW platform
    66. 66. Choose HW plattform http://www.twitter.com/railshoster
    67. 67. Choose HW plattform ‣ Physical HW low budget or real server HW? http://www.twitter.com/railshoster
    68. 68. Choose HW plattform ‣ Physical HW low budget or real server HW? ‣ Virtual HW Amazon EC2, Joyent, EY, ... http://www.twitter.com/railshoster
    69. 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. 70. Choose HW plattform http://www.twitter.com/railshoster
    71. 71. Choose HW plattform ‣ Compare TCO and performance/€ http://www.twitter.com/railshoster
    72. 72. Choose HW plattform ‣ Compare TCO and performance/€ ‣ When is your next scale out? http://www.twitter.com/railshoster
    73. 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. 74. How to build a cluster Cluster dimensions
    75. 75. Cluster dimensions http://www.twitter.com/railshoster
    76. 76. Cluster dimensions ‣ How many servers needed? 2, 4, 6, 10, ... http://www.twitter.com/railshoster
    77. 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. 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. 79. How to build a cluster Cluster design
    80. 80. Cluster design http://www.twitter.com/railshoster
    81. 81. Cluster design ‣ How to distribute components to servers? http://www.twitter.com/railshoster
    82. 82. Cluster design ‣ How to distribute components to servers? ‣ App Server & DB Server together? http://www.twitter.com/railshoster
    83. 83. Cluster design ‣ How to distribute components to servers? ‣ App Server & DB Server together? ‣ Dedicated DB Server? http://www.twitter.com/railshoster
    84. 84. Cluster design http://www.twitter.com/railshoster
    85. 85. Cluster design ‣ Where to put the search server? Sphinx, Solr, ... http://www.twitter.com/railshoster
    86. 86. Cluster design ‣ Where to put the search server? Sphinx, Solr, ... ‣ Where to run background jobs? http://www.twitter.com/railshoster
    87. 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. 88. How to build a cluster Cluster building blocks
    89. 89. Cluster building blocks Network
    90. 90. Network http://www.twitter.com/railshoster
    91. 91. Network ‣ Connection between cluster nodes http://www.twitter.com/railshoster
    92. 92. Network ‣ Connection between cluster nodes ‣ Use a private (!) physical network http://www.twitter.com/railshoster
    93. 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. 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. 95. Cluster building blocks Application Server
    96. 96. Application Server http://www.twitter.com/railshoster
    97. 97. Application Server ‣ Ruby / Ruby on Rails http://www.twitter.com/railshoster
    98. 98. Application Server ‣ Ruby / Ruby on Rails ‣ Passenger our favorite. http://www.twitter.com/railshoster
    99. 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. 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. 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. 102. Application Server http://www.twitter.com/railshoster
    103. 103. Application Server ‣ Python http://www.twitter.com/railshoster
    104. 104. Application Server ‣ Python ‣ mod_python run Python interpreter inside apache. http://www.twitter.com/railshoster
    105. 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. 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. 107. Cluster building blocks Load Balancer
    108. 108. Load Balancer http://www.twitter.com/railshoster
    109. 109. Load Balancer ‣ Most likely not the bottleneck http://www.twitter.com/railshoster
    110. 110. Load Balancer ‣ Most likely not the bottleneck ‣ Often a single point of failure (SPOF) http://www.twitter.com/railshoster
    111. 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. 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. 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. 114. Load Balancer http://www.twitter.com/railshoster
    115. 115. Load Balancer ‣ Open Source Software LBs http://www.twitter.com/railshoster
    116. 116. Load Balancer ‣ Open Source Software LBs ‣ Apache, NGINX, Pound, HA Proxy, ... http://www.twitter.com/railshoster
    117. 117. Load Balancer ‣ Open Source Software LBs ‣ Apache, NGINX, Pound, HA Proxy, ... ‣ LB Appliances BalanceNG, ... http://www.twitter.com/railshoster
    118. 118. Cluster building blocks Storage
    119. 119. Storage http://www.twitter.com/railshoster
    120. 120. Storage ‣ Use a shared filesystem to store user uploads such as profile pictures, etc. http://www.twitter.com/railshoster
    121. 121. Storage ‣ Use a shared filesystem to store user uploads such as profile pictures, etc. ‣ Some storage technologies http://www.twitter.com/railshoster
    122. 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. 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. 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
    125. 125. Storage iSCSI
    126. 126. iSCSI Storage http://www.twitter.com/railshoster
    127. 127. iSCSI Storage ‣ iSCSI = SCSI over TCP http://www.twitter.com/railshoster
    128. 128. iSCSI Storage ‣ iSCSI = SCSI over TCP ‣ Exports a blockdevice http://www.twitter.com/railshoster
    129. 129. iSCSI Storage ‣ iSCSI = SCSI over TCP ‣ Exports a blockdevice ‣ iSCSI = less overhead than NFS http://www.twitter.com/railshoster
    130. 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. 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. 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
    133. 133. Storage iSCSI Storage Appliance
    134. 134. iSCSI Storage Appliance http://www.twitter.com/railshoster
    135. 135. iSCSI Storage Appliance ‣ Think about using a storage appliance, e.g. NetApp http://www.twitter.com/railshoster
    136. 136. iSCSI Storage Appliance ‣ Think about using a storage appliance, e.g. NetApp ‣ Has redundant HW http://www.twitter.com/railshoster
    137. 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. 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. 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
    140. 140. Cluster building blocks Database
    141. 141. Database http://www.twitter.com/railshoster
    142. 142. Database ‣ RDBMS? There are alternatives CouchDB, MongoDB, ... http://www.twitter.com/railshoster
    143. 143. Database ‣ RDBMS? There are alternatives CouchDB, MongoDB, ... ‣ Most likely MySQL, Postgres, ... http://www.twitter.com/railshoster
    144. 144. Database ‣ RDBMS? There are alternatives CouchDB, MongoDB, ... ‣ Most likely MySQL, Postgres, ... ‣ Horizontal DB scale out is ugly http://www.twitter.com/railshoster
    145. 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. 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. 147. Horizontal MySQL scaling?
    148. 148. Database MySQL NDB Cluster
    149. 149. Database http://www.twitter.com/railshoster
    150. 150. Database ‣ NDB MySQL Cluster http://www.twitter.com/railshoster
    151. 151. Database ‣ NDB MySQL Cluster ‣ Features look performance, ... automatic failover, transactions, good write very nice http://www.twitter.com/railshoster
    152. 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. 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. 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. 155. Database http://www.twitter.com/railshoster
    156. 156. Database ‣ NDB MySQL Cluster http://www.twitter.com/railshoster
    157. 157. Database ‣ NDB MySQL Cluster ‣ Only suitable for certain situations http://www.twitter.com/railshoster
    158. 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. 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. 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
    161. 161. Database Replication
    162. 162. Database http://www.twitter.com/railshoster
    163. 163. Database ‣ MA/MA replication http://www.twitter.com/railshoster
    164. 164. Database ‣ MA/MA replication ‣ Possible but http://www.twitter.com/railshoster
    165. 165. Database ‣ MA/MA replication ‣ Possible but ‣ Not conflicts record recommendable except your app resolves db http://www.twitter.com/railshoster
    166. 166. Database http://www.twitter.com/railshoster
    167. 167. Database ‣ MA/SL replication http://www.twitter.com/railshoster
    168. 168. Database ‣ MA/SL replication ‣ Good starting point http://www.twitter.com/railshoster
    169. 169. Database ‣ MA/SL replication ‣ Good starting point ‣ SL = realtime backup of MA DB but http://www.twitter.com/railshoster
    170. 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. 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
    172. 172. Software Deployment
    173. 173. Deployment
    174. 174. Deployment ‣ Capistrano
    175. 175. Deployment ‣ Capistrano ‣ Adapt deployment recipe to server and server roles
    176. 176. Deployment ‣ Capistrano ‣ Adapt deployment recipe to server and server roles ‣ Initial deployment painful
    177. 177. Deployment ‣ Capistrano ‣ Adapt deployment recipe to server and server roles ‣ Initial deployment painful ‣ Further deployments more or less painless
    178. 178. Backups
    179. 179. Backups
    180. 180. Backups ‣ Create automated backups!
    181. 181. Backups ‣ Create automated backups! ‣ Cover filesystem and database
    182. 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. 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.
    184. 184. Monitoring
    185. 185. „Just because you’re paranoid, doesn’t mean they’re not out to get you.“
    186. 186. How does your admin know that something is broken?
    187. 187. Monitoring Nagios
    188. 188. Nagios
    189. 189. Nagios ‣ Nagios monitors key resources of a system. At least it that how it should be configured.
    190. 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. 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. 192. Nagios
    193. 193. Nagios ‣ What should be checked? List is incomplete.
    194. 194. Nagios ‣ What should be checked? List is incomplete. ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow.
    195. 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. 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. 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. 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!
    199. 199. Monitoring Resource History
    200. 200. Resource History
    201. 201. Resource History ‣ Munin
    202. 202. Resource History
    203. 203. Resource History ‣ Stores the consumption of individual resources over time.
    204. 204. Resource History ‣ Stores the consumption of individual resources over time. ‣ Trend analysis. What happened after the last puplicity ploy on our servers?
    205. 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. 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?
    207. 207. Maintenance
    208. 208. Maintenance
    209. 209. Maintenance ‣ OS updates. updates. Minor-, major-, distro
    210. 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. 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. 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. 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. 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. 215. Fazit Ok, nice to know but ...
    216. 216. Fazit ... who the hell should to do all those things and additionally develop an application?
    217. 217. 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
    218. 218. Resources http://www.twitter.com/railshoster
    219. 219. Resources ‣ Python Web Application Hosting http://hostingfu.com/article/python-web-application-hosting http://www.twitter.com/railshoster
    220. 220. 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
    221. 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 ‣ MySQL Cluster http://www.mysql.com/products/database/cluster/ http://www.twitter.com/railshoster
    222. 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/ ‣ Duplicity Backup Tool http://duplicity.nongnu.org/ http://www.twitter.com/railshoster
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×