• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Enterprise Hosting
 

Enterprise Hosting

on

  • 2,918 views

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

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

Statistics

Views

Total Views
2,918
Views on SlideShare
2,590
Embed Views
328

Actions

Likes
5
Downloads
40
Comments
0

8 Embeds 328

http://www.techgig.com 105
http://www.treibstofff.de 81
http://www.enterprise-rails.de 70
http://www.enterprise-rails.com 33
http://www.slideshare.net 23
http://10.150.200.57 13
http://www.linkedin.com 2
http://translate.googleusercontent.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • diff to non enterprise hosting
  • components -> influence on how to distribute your components to servers && <br /> how many && which servers to choose
  • components -> influence on how to distribute your components to servers && <br /> 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 <br /> mod_python
  • wsgi = the way to go, updated frequently <br /> mod_python
  • wsgi = the way to go, updated frequently <br /> mod_python
  • wsgi = the way to go, updated frequently <br /> 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&#xFC;ckblick -> Anwendung l&#xE4;uft jetzt.
  • Kurzer R&#xFC;ckblick -> Anwendung l&#xE4;uft jetzt.
  • Kurzer R&#xFC;ckblick -> Anwendung l&#xE4;uft jetzt.
  • Kurzer R&#xFC;ckblick -> Anwendung l&#xE4;uft jetzt.
  • Nicht immer ist es Server-Versagen. Hacker, Anwendungsfehler --> Datenverlust
  • HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. <br /> Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &#xFC;bersicht verlieren.
  • HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. <br /> Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &#xFC;bersicht verlieren.
  • HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. <br /> Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &#xFC;bersicht verlieren.
  • HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. <br /> Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &#xFC;bersicht verlieren.
  • HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. <br /> Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &#xFC;bersicht verlieren.
  • HTTP+APP = Differentialdiagnose. Webserver OK, Anwendung nicht. Webserver down + APP Down. <br /> Gut einger. Monitoring = Gesundheitszustand des Clusters. Sonst &#xFC;bersicht verlieren.
  • Useraufuchs + Kurze Zusammenfassung: app l&#xE4;uft, backup + monitoring. soll auch so bleiben!
  • Useraufuchs + Kurze Zusammenfassung: app l&#xE4;uft, backup + monitoring. soll auch so bleiben!
  • Useraufuchs + Kurze Zusammenfassung: app l&#xE4;uft, backup + monitoring. soll auch so bleiben!
  • Useraufuchs + Kurze Zusammenfassung: app l&#xE4;uft, backup + monitoring. soll auch so bleiben!
  • Kernelupdates -> Downtime, Dis Update weil Support ausl&#xE4;uft <br /> Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum k&#xFC;mmert
  • Kernelupdates -> Downtime, Dis Update weil Support ausl&#xE4;uft <br /> Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum k&#xFC;mmert
  • Kernelupdates -> Downtime, Dis Update weil Support ausl&#xE4;uft <br /> Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum k&#xFC;mmert
  • Kernelupdates -> Downtime, Dis Update weil Support ausl&#xE4;uft <br /> Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum k&#xFC;mmert
  • Kernelupdates -> Downtime, Dis Update weil Support ausl&#xE4;uft <br /> Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum k&#xFC;mmert
  • Kernelupdates -> Downtime, Dis Update weil Support ausl&#xE4;uft <br /> Ruby/Rails in Abstimmung mit dem Kunden, Verantwortlichen definieren, der sich darum k&#xFC;mmert
  • Trennung der Verantwortlichkeiten, Hosting Team, Dev-Team, h&#xF6;here Produktivit&#xE4;t.

Enterprise Hosting Enterprise Hosting Presentation Transcript

  • Enterprise Hosting for Ruby and Python Julian Fischer fischer@enterprise-rails.de http://www.enterprise-rails.de
  • Introduction
  • Introduction About me
  • About me Julian Fischer ‣Twitter: http://www.twitter.com/railshoster ‣E-Mail: fischer@enterprise-rails.de
  • About me Julian Fischer ‣Twitter: http://www.twitter.com/railshoster ‣E-Mail: fischer@enterprise-rails.de ‣ CEO of Avarteq GmbH
  • About me Julian Fischer ‣Twitter: http://www.twitter.com/railshoster ‣E-Mail: fischer@enterprise-rails.de ‣ CEO of Avarteq GmbH ‣ Lecturer „Ruby on Rails“ @ HTWdS
  • About me Julian Fischer ‣Twitter: http://www.twitter.com/railshoster ‣E-Mail: fischer@enterprise-rails.de ‣ CEO of Avarteq GmbH ‣ Lecturer „Ruby on Rails“ @ HTWdS ‣ Ruby und Ruby on Rails programmer
  • About me Julian Fischer ‣Twitter: http://www.twitter.com/railshoster ‣E-Mail: fischer@enterprise-rails.de ‣ CEO of Avarteq GmbH ‣ Lecturer „Ruby on Rails“ @ HTWdS ‣ Ruby und Ruby on Rails programmer ‣ Entperise-Rails.de - Head of Hosting
  • Introduction About Avarteq GmbH
  • About Avarteq GmbH http://www.twitter.com/railshoster
  • About Avarteq GmbH ‣ Founded in Nov. 2008 from two existing companies. http://www.twitter.com/railshoster
  • About Avarteq GmbH ‣ Founded in Nov. 2008 from two existing companies. ‣ Involvment of Key-Systems GmbH manages ~2,5 * 10^6 domains for customers of 200+ countries. http://www.twitter.com/railshoster
  • About Avarteq GmbH ‣ Founded in Nov. 2008 from two existing companies. ‣ Involvment of Key-Systems GmbH manages ~2,5 * 10^6 domains for customers of 200+ countries. ‣ Team size: 14 people 8 full-time, 6 part-time/freelancer http://www.twitter.com/railshoster
  • Introduction Portfolio
  • About Avarteq GmbH http://www.twitter.com/railshoster
  • About Avarteq GmbH ‣ Covers all stages of web development http://www.twitter.com/railshoster
  • About Avarteq GmbH ‣ Covers all stages of web development ‣ Consulting http://www.twitter.com/railshoster
  • About Avarteq GmbH ‣ Covers all stages of web development ‣ Consulting ‣ Conceptual ~ and screen design http://www.twitter.com/railshoster
  • About Avarteq GmbH ‣ Covers all stages of web development ‣ Consulting ‣ Conceptual ~ and screen design ‣ Ruby&onplace. development. In house in Rails http://www.twitter.com/railshoster
  • About Avarteq GmbH ‣ Covers all stages of web development ‣ Consulting ‣ Conceptual ~ and screen design ‣ Ruby&onplace. development. In house in Rails ‣ Ruby on Rails hosting/servers/clusters RailsHoster.de - Enterprise-Rails.de http://www.twitter.com/railshoster
  • Enterprise Hosting
  • Enterprise Hosting Situation
  • EH - Basic Idea http://www.twitter.com/railshoster
  • EH - Basic Idea ‣ Given http://www.twitter.com/railshoster
  • EH - Basic Idea ‣ Given ‣ Python / Ruby / Rails App http://www.twitter.com/railshoster
  • EH - Basic Idea ‣ Given ‣ Python / Ruby / Rails App ‣ Needed http://www.twitter.com/railshoster
  • EH - Basic Idea ‣ Given ‣ Python / Ruby / Rails App ‣ Needed ‣ Max. availability ideal: 100% uptime http://www.twitter.com/railshoster
  • EH - Basic Idea ‣ Given ‣ Python / Ruby / Rails App ‣ Needed ‣ Max. availability ideal: 100% uptime ‣ Acceptable performance even for peaks, e.g. <= 200 ms response time / request http://www.twitter.com/railshoster
  • Enterprise Hosting Obstacles
  • EH - Obstacles http://www.twitter.com/railshoster
  • EH - Obstacles ‣ Single server = a lot of SPOFs http://www.twitter.com/railshoster
  • EH - Obstacles ‣ Single server = a lot of SPOFs ‣ Multiple servers = a lot of work http://www.twitter.com/railshoster
  • EH - Obstacles ‣ Single server = a lot of SPOFs ‣ Multiple servers = a lot of work ‣ Eliminating SPOFs is not easy/possible for every service http://www.twitter.com/railshoster
  • How to build a fancy & rockin‘ cluster?
  • Cluster Building Blocks Monitoring DBApp Backups Storage MA/SL LB Enterprise Cluster
  • Cluster Building Blocks Monitoring DB MA/SL Backups Storage LB App Enterprise Cluster
  • Cluster Building Blocks Monitoring DB MA/SL Backups Storage App LB Enterprise Cluster
  • Cluster Building Blocks Monitoring DB MA/SL Backups Storage App LB Enterprise Cluster
  • Cluster Building Blocks Monitoring Backups DBApp Storage MA/SL LB Enterprise Cluster
  • Cluster Building Blocks Monitoring DBApp Backups Storage MA/SL LB Enterprise Cluster
  • Cluster Building Blocks Monitoring DBApp Backups Storage MA/SL LB Enterprise Cluster
  • Cluster Building Blocks Monitoring DBApp Backups Storage MA/SL LB Enterprise Cluster ✓
  • maybe it‘s not that easy :)
  • How to build a cluster Requirements Analysis
  • How to build a cluster http://www.twitter.com/railshoster
  • How to build a cluster ‣ desired response time which again depends on several factors http://www.twitter.com/railshoster
  • How to build a cluster ‣ desired response time which again depends on several factors ‣ average load e.g. on a cloudy sunday afternoon http://www.twitter.com/railshoster
  • How to build a cluster ‣ desired response time which again depends on several factors ‣ average load e.g. on a cloudy sunday afternoon ‣ peak load e.g. after being a new trend on twitter http://www.twitter.com/railshoster
  • How to build a cluster ‣ desired response time which again depends on several factors ‣ average load e.g. on a cloudy sunday afternoon ‣ peak load e.g. after being a new trend on twitter ‣ ... http://www.twitter.com/railshoster
  • How to build a cluster http://www.twitter.com/railshoster
  • How to build a cluster ‣ which components are present? search server, background processing, key/value store, replicating rdbms, ... http://www.twitter.com/railshoster
  • How to build a cluster ‣ which components are present? search server, background processing, key/value store, replicating rdbms, ... ‣ apptired programmers? & quality coded by super geeks or a lot of performance http://www.twitter.com/railshoster
  • How to build a cluster http://www.twitter.com/railshoster
  • How to build a cluster ‣ Do it yourself or full management? http://www.twitter.com/railshoster
  • How to build a cluster ‣ Do it yourself or full management? ‣ admin know how present? Is your team able to care of things like http://www.twitter.com/railshoster
  • How to build a cluster ‣ Do it yourself or full management? ‣ admin know how present? Is your team able to care of things like ‣ os updates http://www.twitter.com/railshoster
  • How to build a cluster ‣ Do it yourself or full management? ‣ admin know how present? Is your team able to care of things like ‣ os updates ‣ web server & load balancer setup http://www.twitter.com/railshoster
  • How to build a cluster ‣ Do it yourself or full management? ‣ admin know how present? Is your team able to care of things like ‣ os updates ‣ web server & load balancer setup ‣ db configuration & tuning http://www.twitter.com/railshoster
  • How to build a cluster ‣ Do it yourself or full management? ‣ admin know how present? Is your team able to care of things like ‣ os updates ‣ web server & load balancer setup ‣ db configuration & tuning ‣ monitoring, ... http://www.twitter.com/railshoster
  • How to build a cluster http://www.twitter.com/railshoster
  • How to build a cluster ‣ Willing to fight with a large number of servers a lot of programmers don‘t want to do both: programming & hosting http://www.twitter.com/railshoster
  • How to build a cluster ‣ Willing to fight with a large number of servers a lot of programmers don‘t want to do both: programming & hosting ‣ Available budget http://www.twitter.com/railshoster
  • How to build a cluster ‣ Willing to fight with a large number of servers a lot of programmers don‘t want to do both: programming & hosting ‣ Available budget ‣ more servers ... more reliability, more performance http://www.twitter.com/railshoster
  • How to build a cluster ‣ Willing to fight with a large number of servers a lot of programmers don‘t want to do both: programming & hosting ‣ Available budget ‣ more servers ... more reliability, more performance ‣ Many other questions ... http://www.twitter.com/railshoster
  • How to build a cluster Choose your HW platform
  • Choose HW plattform http://www.twitter.com/railshoster
  • Choose HW plattform ‣ Physical HW low budget or real server HW? http://www.twitter.com/railshoster
  • Choose HW plattform ‣ Physical HW low budget or real server HW? ‣ Virtual HW Amazon EC2, Joyent, EY, ... http://www.twitter.com/railshoster
  • Choose HW plattform ‣ Physical HW low budget or real server HW? ‣ Virtual HW Amazon EC2, Joyent, EY, ... ‣ Assume we use physical HW ... http://www.twitter.com/railshoster
  • Choose HW plattform http://www.twitter.com/railshoster
  • Choose HW plattform ‣ Compare TCO and performance/€ http://www.twitter.com/railshoster
  • Choose HW plattform ‣ Compare TCO and performance/€ ‣ When is your next scale out? http://www.twitter.com/railshoster
  • Choose HW plattform ‣ Compare TCO and performance/€ ‣ When is your next scale out? ‣ Do you really need to scale within hours? ... and is it worth to pay a lot of extra money? Estimate your resource consumption grow rate e.g. using Munin. http://www.twitter.com/railshoster
  • How to build a cluster Cluster dimensions
  • Cluster dimensions http://www.twitter.com/railshoster
  • Cluster dimensions ‣ How many servers needed? 2, 4, 6, 10, ... http://www.twitter.com/railshoster
  • Cluster dimensions ‣ How many servers needed? 2, 4, 6, 10, ... ‣ Which systems components will be there? App, MA DB, SL DB, BG-Jobs, Search-Server, Memcached, Storage, ... http://www.twitter.com/railshoster
  • Cluster dimensions ‣ How many servers needed? 2, 4, 6, 10, ... ‣ Which systems components will be there? App, MA DB, SL DB, BG-Jobs, Search-Server, Memcached, Storage, ... ‣ Which HW will be most suitable for each individual role? DB Server = a lot of fast hdds, BG-Kob Server = a lot of cpus, ... http://www.twitter.com/railshoster
  • How to build a cluster Cluster design
  • Cluster design http://www.twitter.com/railshoster
  • Cluster design ‣ How to distribute components to servers? http://www.twitter.com/railshoster
  • Cluster design ‣ How to distribute components to servers? ‣ App Server & DB Server together? http://www.twitter.com/railshoster
  • Cluster design ‣ How to distribute components to servers? ‣ App Server & DB Server together? ‣ Dedicated DB Server? http://www.twitter.com/railshoster
  • Cluster design http://www.twitter.com/railshoster
  • Cluster design ‣ Where to put the search server? Sphinx, Solr, ... http://www.twitter.com/railshoster
  • Cluster design ‣ Where to put the search server? Sphinx, Solr, ... ‣ Where to run background jobs? http://www.twitter.com/railshoster
  • Cluster design ‣ Where to put the search server? Sphinx, Solr, ... ‣ Where to run background jobs? ‣ Where to run message queues? See talk of Paolo Negri. http://www.twitter.com/railshoster
  • How to build a cluster Cluster building blocks
  • Cluster building blocks Network
  • Network http://www.twitter.com/railshoster
  • Network ‣ Connection between cluster nodes http://www.twitter.com/railshoster
  • Network ‣ Connection between cluster nodes ‣ Use a private (!) physical network http://www.twitter.com/railshoster
  • Network ‣ Connection between cluster nodes ‣ Use a private (!) physical network ‣ Minimize communication latency distribution might cost performance for low load scenarios http://www.twitter.com/railshoster
  • Network ‣ Connection between cluster nodes ‣ Use a private (!) physical network ‣ Minimize communication latency distribution might cost performance for low load scenarios ‣ >= 1even within the same datacenter hosters limit bandwith between servers GBit/s be aware that some http://www.twitter.com/railshoster
  • Cluster building blocks Application Server
  • Application Server http://www.twitter.com/railshoster
  • Application Server ‣ Ruby / Ruby on Rails http://www.twitter.com/railshoster
  • Application Server ‣ Ruby / Ruby on Rails ‣ Passenger our favorite. http://www.twitter.com/railshoster
  • Application Server ‣ Ruby / Ruby on Rails ‣ Passenger our favorite. ‣ LB &&interesting. Thin and mongrel do their job. Unicorn is (Unicorn || Thin || Mongrel) http://www.twitter.com/railshoster
  • Application Server ‣ Ruby / Ruby on Rails ‣ Passenger our favorite. ‣ LB &&interesting. Thin and mongrel do their job. Unicorn is (Unicorn || Thin || Mongrel) ‣ JRuby with Glassfish-Gem or servlet containers like Glassfish-Server, Jetty, Tomacat, ... http://www.twitter.com/railshoster
  • Application Server ‣ Ruby / Ruby on Rails ‣ Passenger our favorite. ‣ LB &&interesting. Thin and mongrel do their job. Unicorn is (Unicorn || Thin || Mongrel) ‣ JRuby with Glassfish-Gem or servlet containers like Glassfish-Server, Jetty, Tomacat, ... ‣ others CGI, fastCGI, SCGI, ... http://www.twitter.com/railshoster
  • Application Server http://www.twitter.com/railshoster
  • Application Server ‣ Python http://www.twitter.com/railshoster
  • Application Server ‣ Python ‣ mod_python run Python interpreter inside apache. http://www.twitter.com/railshoster
  • Application Server ‣ Python ‣ mod_python run Python interpreter inside apache. ‣ mod_wsgi better speed & memory usage than mod_python. http://www.twitter.com/railshoster
  • Application Server ‣ Python ‣ mod_python run Python interpreter inside apache. ‣ mod_wsgi better speed & memory usage than mod_python. ‣ others CGI, fastCGI, SCGI, ... http://www.twitter.com/railshoster
  • Cluster building blocks Load Balancer
  • Load Balancer http://www.twitter.com/railshoster
  • Load Balancer ‣ Most likely not the bottleneck http://www.twitter.com/railshoster
  • Load Balancer ‣ Most likely not the bottleneck ‣ Often a single point of failure (SPOF) http://www.twitter.com/railshoster
  • Load Balancer ‣ Most likely not the bottleneck ‣ Often a single point of failure (SPOF) ‣ Two are better than one! http://www.twitter.com/railshoster
  • Load Balancer ‣ Most likely not the bottleneck ‣ Often a single point of failure (SPOF) ‣ Two are better than one! ‣ What to do if one fails? http://www.twitter.com/railshoster
  • Load Balancer ‣ Most likely not the bottleneck ‣ Often a single point of failure (SPOF) ‣ Two are better than one! ‣ What to do if one fails? ‣ Setup automatic IP failover not possible in every datacenter http://www.twitter.com/railshoster
  • Load Balancer http://www.twitter.com/railshoster
  • Load Balancer ‣ Open Source Software LBs http://www.twitter.com/railshoster
  • Load Balancer ‣ Open Source Software LBs ‣ Apache, NGINX, Pound, HA Proxy, ... http://www.twitter.com/railshoster
  • Load Balancer ‣ Open Source Software LBs ‣ Apache, NGINX, Pound, HA Proxy, ... ‣ LB Appliances BalanceNG, ... http://www.twitter.com/railshoster
  • Cluster building blocks Storage
  • Storage http://www.twitter.com/railshoster
  • Storage ‣ Use a shared filesystem to store user uploads such as profile pictures, etc. http://www.twitter.com/railshoster
  • Storage ‣ Use a shared filesystem to store user uploads such as profile pictures, etc. ‣ Some storage technologies http://www.twitter.com/railshoster
  • Storage ‣ Use a shared filesystem to store user uploads such as profile pictures, etc. ‣ Some storage technologies ‣ NFS, sync or async, often a SPOF, lot of overhead http://www.twitter.com/railshoster
  • Storage ‣ Use a shared filesystem to store user uploads such as profile pictures, etc. ‣ Some storage technologies ‣ NFS, sync or async, often a SPOF, lot of overhead ‣ RSync, async, replication lag http://www.twitter.com/railshoster
  • Storage ‣ Use a shared filesystem to store user uploads such as profile pictures, etc. ‣ Some storage technologies ‣ NFS, sync or async, often a SPOF, lot of overhead ‣ RSync, async, replication lag ‣ iSCSI && (GFS || OCFS2), incredibly fast http://www.twitter.com/railshoster
  • Storage iSCSI
  • iSCSI Storage http://www.twitter.com/railshoster
  • iSCSI Storage ‣ iSCSI = SCSI over TCP http://www.twitter.com/railshoster
  • iSCSI Storage ‣ iSCSI = SCSI over TCP ‣ Exports a blockdevice http://www.twitter.com/railshoster
  • iSCSI Storage ‣ iSCSI = SCSI over TCP ‣ Exports a blockdevice ‣ iSCSI = less overhead than NFS http://www.twitter.com/railshoster
  • iSCSI Storage ‣ iSCSI = SCSI over TCP ‣ Exports a blockdevice ‣ iSCSI = less overhead than NFS ‣ Need to use a distributed FS like http://www.twitter.com/railshoster
  • iSCSI Storage ‣ iSCSI = SCSI over TCP ‣ Exports a blockdevice ‣ iSCSI = less overhead than NFS ‣ Need to use a distributed FS like ‣ GFS http://www.twitter.com/railshoster
  • iSCSI Storage ‣ iSCSI = SCSI over TCP ‣ Exports a blockdevice ‣ iSCSI = less overhead than NFS ‣ Need to use a distributed FS like ‣ GFS ‣ OCFS2 http://www.twitter.com/railshoster
  • Storage iSCSI Storage Appliance
  • iSCSI Storage Appliance http://www.twitter.com/railshoster
  • iSCSI Storage Appliance ‣ Think about using a storage appliance, e.g. NetApp http://www.twitter.com/railshoster
  • iSCSI Storage Appliance ‣ Think about using a storage appliance, e.g. NetApp ‣ Has redundant HW http://www.twitter.com/railshoster
  • iSCSI Storage Appliance ‣ Think about using a storage appliance, e.g. NetApp ‣ Has redundant HW ‣ Out of the box solution http://www.twitter.com/railshoster
  • iSCSI Storage Appliance ‣ Think about using a storage appliance, e.g. NetApp ‣ Has redundant HW ‣ Out of the box solution ‣ Very low maintenance http://www.twitter.com/railshoster
  • iSCSI Storage Appliance ‣ Think about using a storage appliance, e.g. NetApp ‣ Has redundant HW ‣ Out of the box solution ‣ Very low maintenance ‣ Connect each app server via dedicated GBit LAN connections http://www.twitter.com/railshoster
  • Cluster building blocks Database
  • Database http://www.twitter.com/railshoster
  • Database ‣ RDBMS? There are alternatives CouchDB, MongoDB, ... http://www.twitter.com/railshoster
  • Database ‣ RDBMS? There are alternatives CouchDB, MongoDB, ... ‣ Most likely MySQL, Postgres, ... http://www.twitter.com/railshoster
  • Database ‣ RDBMS? There are alternatives CouchDB, MongoDB, ... ‣ Most likely MySQL, Postgres, ... ‣ Horizontal DB scale out is ugly http://www.twitter.com/railshoster
  • Database ‣ RDBMS? There are alternatives CouchDB, MongoDB, ... ‣ Most likely MySQL, Postgres, ... ‣ Horizontal DB scale out is ugly ‣ Scaleout vertically, first http://www.twitter.com/railshoster
  • Database ‣ RDBMS? There are alternatives CouchDB, MongoDB, ... ‣ Most likely MySQL, Postgres, ... ‣ Horizontal DB scale out is ugly ‣ Scaleout vertically, first ‣ CPU++, RAM++, a lot of fast HDDs http://www.twitter.com/railshoster
  • Horizontal MySQL scaling?
  • Database MySQL NDB Cluster
  • Database http://www.twitter.com/railshoster
  • Database ‣ NDB MySQL Cluster http://www.twitter.com/railshoster
  • Database ‣ NDB MySQL Cluster ‣ Features look performance, ... automatic failover, transactions, good write very nice http://www.twitter.com/railshoster
  • Database ‣ NDB MySQL Cluster ‣ Features look performance, ... automatic failover, transactions, good write very nice ‣ At failover advantages. gain least 3 physical maschines needed to http://www.twitter.com/railshoster
  • Database ‣ NDB MySQL Cluster ‣ Features look performance, ... automatic failover, transactions, good write very nice ‣ At failover advantages. gain least 3 physical maschines needed to ‣ Certain joins. such as large statements are incredibly slow http://www.twitter.com/railshoster
  • Database ‣ NDB MySQL Cluster ‣ Features look performance, ... automatic failover, transactions, good write very nice ‣ At failover advantages. gain least 3 physical maschines needed to ‣ Certain joins. such as large statements are incredibly slow ‣ DB sizestored in memory. RAM size since indexed columns are limited by http://www.twitter.com/railshoster
  • Database http://www.twitter.com/railshoster
  • Database ‣ NDB MySQL Cluster http://www.twitter.com/railshoster
  • Database ‣ NDB MySQL Cluster ‣ Only suitable for certain situations http://www.twitter.com/railshoster
  • Database ‣ NDB MySQL Cluster ‣ Only suitable for certain situations ‣ Joins avoided by using a search server solr, sphinx, ... http://www.twitter.com/railshoster
  • Database ‣ NDB MySQL Cluster ‣ Only suitable for certain situations ‣ Joins avoided by using a search server solr, sphinx, ... ‣ Many write transactions but slow data grow rate http://www.twitter.com/railshoster
  • Database ‣ NDB MySQL Cluster ‣ Only suitable for certain situations ‣ Joins avoided by using a search server solr, sphinx, ... ‣ Many write transactions but slow data grow rate ‣ Maybe replication is an alternative ... http://www.twitter.com/railshoster
  • Database Replication
  • Database http://www.twitter.com/railshoster
  • Database ‣ MA/MA replication http://www.twitter.com/railshoster
  • Database ‣ MA/MA replication ‣ Possible but http://www.twitter.com/railshoster
  • Database ‣ MA/MA replication ‣ Possible but ‣ Not conflicts record recommendable except your app resolves db http://www.twitter.com/railshoster
  • Database http://www.twitter.com/railshoster
  • Database ‣ MA/SL replication http://www.twitter.com/railshoster
  • Database ‣ MA/SL replication ‣ Good starting point http://www.twitter.com/railshoster
  • Database ‣ MA/SL replication ‣ Good starting point ‣ SL = realtime backup of MA DB but http://www.twitter.com/railshoster
  • Database ‣ MA/SL replication ‣ Good starting point ‣ SL = realtime backup of MA DB but ‣ Can be used read-only http://www.twitter.com/railshoster
  • Database ‣ MA/SL replication ‣ Good starting point ‣ SL = realtime backup of MA DB but ‣ Can be used read-only ‣ No automatica failover but manual failoverfor the faster than reinstalling single server. But calculate time is still master reintegration! http://www.twitter.com/railshoster
  • Software Deployment
  • Deployment
  • Deployment ‣ Capistrano
  • Deployment ‣ Capistrano ‣ Adapt deployment recipe to server and server roles
  • Deployment ‣ Capistrano ‣ Adapt deployment recipe to server and server roles ‣ Initial deployment painful
  • Deployment ‣ Capistrano ‣ Adapt deployment recipe to server and server roles ‣ Initial deployment painful ‣ Further deployments more or less painless
  • Backups
  • Backups
  • Backups ‣ Create automated backups!
  • Backups ‣ Create automated backups! ‣ Cover filesystem and database
  • Backups ‣ Create automated backups! ‣ Cover filesystem and database ‣ Create them, pack them, encrypt them and upload them to a safe place. e.g. use duplicity!
  • Backups ‣ Create automated backups! ‣ Cover filesystem and database ‣ Create them, pack them, encrypt them and upload them to a safe place. e.g. use duplicity! ‣ Test backups regularily. Broken backups = no backups.
  • Monitoring
  • „Just because you’re paranoid, doesn’t mean they’re not out to get you.“
  • How does your admin know that something is broken?
  • Monitoring Nagios
  • Nagios
  • Nagios ‣ Nagios monitors key resources of a system. At least it that how it should be configured.
  • Nagios ‣ Nagios monitors key resources of a system. At least it that how it should be configured. ‣ Is some resource not responding or hits a threshold: notify! Again, that‘s how it should be.
  • Nagios ‣ Nagios monitors key resources of a system. At least it that how it should be configured. ‣ Is some resource not responding or hits a threshold: notify! Again, that‘s how it should be. ‣ Also consider using monit for local proactive monitoring issues.
  • Nagios
  • Nagios ‣ What should be checked? List is incomplete.
  • Nagios ‣ What should be checked? List is incomplete. ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow.
  • Nagios ‣ What should be checked? List is incomplete. ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow. ‣ LOAD. More sysload than cores? Processes need to wait.
  • Nagios ‣ What should be checked? List is incomplete. ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow. ‣ LOAD. More sysload than cores? Processes need to wait. ‣ HTTP. Webserver, are you still there?
  • Nagios ‣ What should be checked? List is incomplete. ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow. ‣ LOAD. More sysload than cores? Processes need to wait. ‣ HTTP. Webserver, are you still there? ‣ APP. Does my app still serve my control string XY?
  • Nagios ‣ What should be checked? List is incomplete. ‣ Swap. Lot of swap usage = not enough RAM = Sloooooow. ‣ LOAD. More sysload than cores? Processes need to wait. ‣ HTTP. Webserver, are you still there? ‣ APP. Does my app still serve my control string XY? ‣ and a lot more!
  • Monitoring Resource History
  • Resource History
  • Resource History ‣ Munin
  • Resource History
  • Resource History ‣ Stores the consumption of individual resources over time.
  • Resource History ‣ Stores the consumption of individual resources over time. ‣ Trend analysis. What happened after the last puplicity ploy on our servers?
  • Resource History ‣ Stores the consumption of individual resources over time. ‣ Trend analysis. What happened after the last puplicity ploy on our servers? ‣ Scale out needed? Or maybe in a month?
  • Resource History ‣ Stores the consumption of individual resources over time. ‣ Trend analysis. What happened after the last puplicity ploy on our servers? ‣ Scale out needed? Or maybe in a month? ‣ Does my app leak?
  • Maintenance
  • Maintenance
  • Maintenance ‣ OS updates. updates. Minor-, major-, distro
  • Maintenance ‣ OS updates. updates. Minor-, major-, distro ‣ Take a server out of the cluster to perform bigger updates. Reintegrate if afterwards. No or minor service impact.
  • Maintenance ‣ OS updates. updates. Minor-, major-, distro ‣ Take a server out of the cluster to perform bigger updates. Reintegrate if afterwards. No or minor service impact. ‣ Ruby Updates. Ruby, Rails, Gems, ...
  • Maintenance ‣ OS updates. updates. Minor-, major-, distro ‣ Take a server out of the cluster to perform bigger updates. Reintegrate if afterwards. No or minor service impact. ‣ Ruby Updates. Ruby, Rails, Gems, ... ‣ Rotation and monitoring of logs. Bad things going on?
  • Maintenance ‣ OS updates. updates. Minor-, major-, distro ‣ Take a server out of the cluster to perform bigger updates. Reintegrate if afterwards. No or minor service impact. ‣ Ruby Updates. Ruby, Rails, Gems, ... ‣ Rotation and monitoring of logs. Bad things going on? ‣ Check your backups!
  • Maintenance ‣ OS updates. updates. Minor-, major-, distro ‣ Take a server out of the cluster to perform bigger updates. Reintegrate if afterwards. No or minor service impact. ‣ Ruby Updates. Ruby, Rails, Gems, ... ‣ Rotation and monitoring of logs. Bad things going on? ‣ Check your backups! ‣ ...
  • Fazit Ok, nice to know but ...
  • Fazit ... who the hell should to do all those things and additionally develop an application?
  • Thank you for your attention! Headquarter: Rails Enterprise Hosting: http://www.avarteq.de http://www.enterprise- rails.de Blog: http://ww.treibstofff.de Rails Hosting: http://www.railshoster.de
  • Resources http://www.twitter.com/railshoster
  • Resources ‣ Python Web Application Hosting http://hostingfu.com/article/python-web-application-hosting http://www.twitter.com/railshoster
  • Resources ‣ Python Web Application Hosting http://hostingfu.com/article/python-web-application-hosting ‣ Apache and mod_wsgi http://djangoinproduction.com/wiki/Apache_and_mod_wsgi http://www.twitter.com/railshoster
  • Resources ‣ Python Web Application Hosting http://hostingfu.com/article/python-web-application-hosting ‣ Apache and mod_wsgi http://djangoinproduction.com/wiki/Apache_and_mod_wsgi ‣ MySQL Cluster http://www.mysql.com/products/database/cluster/ http://www.twitter.com/railshoster
  • Resources ‣ Python Web Application Hosting http://hostingfu.com/article/python-web-application-hosting ‣ Apache and mod_wsgi http://djangoinproduction.com/wiki/Apache_and_mod_wsgi ‣ MySQL Cluster http://www.mysql.com/products/database/cluster/ ‣ Duplicity Backup Tool http://duplicity.nongnu.org/ http://www.twitter.com/railshoster