Drupal in the Cloud
 High Performance & High Availability


                                © 2010 Freistil-
                                    Consulting
                                http://www.freistil-
                                      consulting.de


                                                       1
100%
                                           Buzzword
                                          compliant!




Drupal in the Cloud
 High Performance & High Availability


                                © 2010 Freistil-
                                    Consulting
                                http://www.freistil-
                                      consulting.de


                                                       1
Why move to the Cloud?




                         2
Why move to the Cloud?




                         2
Jochen Lillich




                 3
Jochen Lillich




    @geewiz


                 3
Jochen Lillich




    @geewiz      @freistil


                             3
Topics of this talk




                      4
Topics of this talk



•High Performance Drupal



                           4
Topics of this talk



•High Performance Drupal
•Cloud Computing


                           4
Topics of this talk



•High Performance Drupal
•Cloud Computing
•Drupal on Amazon EC2

                           4
5
High Performance
     Drupal


                   5
Standard Installation




            LAMP




                        6
Vertical Scaling




             LAMP

                    7
Horizontal Scaling




            LAMP




                     8
Separation of Concerns




                         9
Separation of Concerns




         Web Frontend




                         9
Separation of Concerns




             Web Frontend



  Database

                            9
Separation of Concerns




             Web Frontend



  Database                  File Storage

                                           9
Redundancy




             Web Frontend



  Database                  File Storage

                                           10
Frontend Scaling




                   11
Frontend Scaling
• Load Balancing




                   11
Frontend Scaling
• Load Balancing
• Caching




                   11
Frontend Scaling
• Load Balancing
• Caching
 • Static files




                   11
Frontend Scaling
• Load Balancing
• Caching
 • Static files
 • Anonymous requests




                        11
Frontend Scaling
• Load Balancing
• Caching
 • Static files
 • Anonymous requests
 • Logged in users




                        11
Frontend Scaling
• Load Balancing
• Caching
 • Static files
 • Anonymous requests
 • Logged in users
 • PHP code



                        11
Frontend Scaling
• Load Balancing
• Caching
 • Static files
 • Anonymous requests
 • Logged in users
 • PHP code
 • Database requests


                        11
Frontend Scaling
• Load Balancing
• Caching
 • Static files
 • Anonymous requests
 • Logged in users
 • PHP code
 • Database requests
• CDN
                        11
Frontend Scaling
• Load Balancing
• Caching
 • Static files
 • Anonymous requests
 • Logged in users
 • PHP code
 • Database requests
• CDN
• Solr Search
                        11
Database Scaling




                   12
Database Scaling



•Replication



                   12
Database Scaling



•Replication
•MySQL Proxy


                   12
Database Scaling



•Replication
•MySQL Proxy
•MySQL Cluster

                   12
Storage Scaling




                  13
Storage Scaling

•Proprietary Storage Systems




                               13
Storage Scaling

•Proprietary Storage Systems
•Central File Systems




                               13
Storage Scaling

•Proprietary Storage Systems
•Central File Systems
•File System Cloning



                               13
Storage Scaling

•Proprietary Storage Systems
•Central File Systems
•File System Cloning
 •Tool-based


                               13
Storage Scaling

•Proprietary Storage Systems
•Central File Systems
•File System Cloning
 •Tool-based
 •Kernel-based

                               13
Storage Scaling

•Proprietary Storage Systems
•Central File Systems
•File System Cloning
 •Tool-based
 •Kernel-based
 •Cluster FS
                               13
Summary




          14
Summary

•Horizontal Scaling gives you




                                14
Summary

•Horizontal Scaling gives you
 •high performance and




                                14
Summary

•Horizontal Scaling gives you
 •high performance and
 •high availability



                                14
Summary

•Horizontal Scaling gives you
 •high performance and
 •high availability
•at the cost of

                                14
Summary

•Horizontal Scaling gives you
 •high performance and
 •high availability
•at the cost of
 •more infrastructure
                                14
15
Cloud Computing



                  15
Cloud Computing




                  16
Cloud Computing


•Virtual computing resources




                               16
Cloud Computing


•Virtual computing resources
 •highly abstracted



                               16
Cloud Computing


•Virtual computing resources
 •highly abstracted
 •broadly shared


                               16
Cloud Computing


•Virtual computing resources
 •highly abstracted
 •broadly shared
 •rapidly provisioned

                               16
Providers




            17
Providers
•Infrastructure Platforms




                            17
Providers
•Infrastructure Platforms
 •Amazon Web Services




                            17
Providers
•Infrastructure Platforms
 •Amazon Web Services
 •Rackspace Cloud




                            17
Providers
•Infrastructure Platforms
 •Amazon Web Services
 •Rackspace Cloud
 •GoGrid



                            17
Providers
•Infrastructure Platforms
 •Amazon Web Services
 •Rackspace Cloud
 •GoGrid
•Application Platforms

                            17
Providers
•Infrastructure Platforms
 •Amazon Web Services
 •Rackspace Cloud
 •GoGrid
•Application Platforms
 •Google App Engine
                            17
Providers
•Infrastructure Platforms
 •Amazon Web Services
 •Rackspace Cloud
 •GoGrid
•Application Platforms
 •Google App Engine
 •EngineYard
                            17
Amazon Web Services




                      18
Pros & Cons




              19
Pros & Cons

•Advantages




              19
Pros & Cons

•Advantages
 •Minimal CapEx




                  19
Pros & Cons

•Advantages
 •Minimal CapEx
 •Easy resource management



                             19
Pros & Cons

•Advantages
 •Minimal CapEx
 •Easy resource management
•Challenges


                             19
Pros & Cons

•Advantages
 •Minimal CapEx
 •Easy resource management
•Challenges
 •Automation

                             19
Pros & Cons

•Advantages
 •Minimal CapEx
 •Easy resource management
•Challenges
 •Automation
 •Legal issues
                             19
20
Drupal on EC2



                20
Instance Creation




                    21
Instance Creation

•User Interface




                    21
Instance Creation

•User Interface
 •AWS Console




                    21
Instance Creation

•User Interface
 •AWS Console
 •EC2 CLI



                    21
Instance Creation

•User Interface
 •AWS Console
 •EC2 CLI
•AMI


                    21
Instance Creation

•User Interface
 •AWS Console
 •EC2 CLI
•AMI
 •Ubuntu

                    21
Instance Creation

•User Interface
 •AWS Console
 •EC2 CLI
•AMI
 •Ubuntu
 •Mercury
                    21
Deployment




             22
Deployment

•Manual




             22
Deployment

•Manual
 •SFTP




             22
Deployment

•Manual
 •SFTP
 •SSH + Drush



                22
Deployment

•Manual
 •SFTP
 •SSH + Drush
 •VCS


                22
Deployment

•Manual
 •SFTP
 •SSH + Drush
 •VCS
•Automatic

                22
Deployment

•Manual
 •SFTP
 •SSH + Drush
 •VCS
•Automatic
 •Puppet / Chef / BCFG2
                          22
Deployment

•Manual
 •SFTP
 •SSH + Drush
 •VCS
•Automatic
 •Puppet / Chef / BCFG2
                          22
System Management




                    23
System Management
•Monitoring




                    23
System Management
•Monitoring
 •Nagios / ICINGA




                    23
System Management
•Monitoring
 •Nagios / ICINGA
 •Amazon CloudWatch




                      23
System Management
•Monitoring
 •Nagios / ICINGA
 •Amazon CloudWatch
•Failover / Scaling


                      23
System Management
•Monitoring
 •Nagios / ICINGA
 •Amazon CloudWatch
•Failover / Scaling
 •DIY


                      23
System Management
•Monitoring
 •Nagios / ICINGA
 •Amazon CloudWatch
•Failover / Scaling
 •DIY
 •Clustering software
                        23
System Management
•Monitoring
 •Nagios / ICINGA
 •Amazon CloudWatch
•Failover / Scaling
 •DIY
 •Clustering software
 •Amazon Auto Scaling
                        23
Example infrastructure

                                               Firewall




                                                                Load Balancer
                                 Application Repository



   Frontend Servers

                      Staging Webserver                   Production Webserver
                                                                 Cluster




   Backend Servers
                          Database        Storage          Search
                           Cluster        Cluster          Cluster
                                                                                 24
25
Conclusion



             25
Summary




          26
Summary


•Flexible resource handling




                              26
Summary


•Flexible resource handling
•Minimal capital expenses



                              26
Summary


•Flexible resource handling
•Minimal capital expenses
•Efficiency needs automation


                               26
Summary


•Flexible resource handling
•Minimal capital expenses
•Efficiency needs automation
•Effectiveness needs experience

                                  26
Get the book!


  What‘s the name of the Amazon Machine Image

    that provides you with a complete Drupal

   installation including APC, Varnish and Solr

                     Search?



                                                  27
Your questions?


      jochen@freistil-consulting.de

     http://www.freistil-consulting.de




                                         28
Your questions?


      jochen@freistil-consulting.de

     http://www.freistil-consulting.de


            Thank you.


                                         28

Drupal In The Cloud

Editor's Notes

  • #2 How to use agile Cloud infrastructure resources to obtain optimal efficiency in Drupal operations.
  • #3 As always, Dilbert has the answer.
  • #4 40 yrs, computer science. Linux 1994, Drupal 2007. IT manager at two of the biggest ISPs in Germany, WEB.DE and 1&1. Today Head Honcho at Freistil-Consulting: Services for IT Management, both in the infrastructure + leadership sense
  • #5 40 yrs, computer science. Linux 1994, Drupal 2007. IT manager at two of the biggest ISPs in Germany, WEB.DE and 1&1. Today Head Honcho at Freistil-Consulting: Services for IT Management, both in the infrastructure + leadership sense
  • #6 Every topic could be a seperate talk. Book raffle: After talk question whose answer is hidden in my talk.
  • #7 Every topic could be a seperate talk. Book raffle: After talk question whose answer is hidden in my talk.
  • #8 Every topic could be a seperate talk. Book raffle: After talk question whose answer is hidden in my talk.
  • #9 What‘s important when your Drupal website grows?
  • #10 Standard installation: LAMP stack and Drupal all on one server. When you need more performance, you‘ll have two options.
  • #11 Vertical scaling means using a bigger server.
  • #12 Distributing the load Seperate the different functions of the LAMP+Drupal stack.
  • #16 More than one server for each function not only gives even more performance, but also higher availability.
  • #17 perlbal, IPVS Squid, HAproxy Varnish, Boost, AuthCache, Memcache Akamai, Amazon CloudFront
  • #18 perlbal, IPVS Squid, HAproxy Varnish, Boost, AuthCache, Memcache Akamai, Amazon CloudFront
  • #19 perlbal, IPVS Squid, HAproxy Varnish, Boost, AuthCache, Memcache Akamai, Amazon CloudFront
  • #20 perlbal, IPVS Squid, HAproxy Varnish, Boost, AuthCache, Memcache Akamai, Amazon CloudFront
  • #21 perlbal, IPVS Squid, HAproxy Varnish, Boost, AuthCache, Memcache Akamai, Amazon CloudFront
  • #22 perlbal, IPVS Squid, HAproxy Varnish, Boost, AuthCache, Memcache Akamai, Amazon CloudFront
  • #23 perlbal, IPVS Squid, HAproxy Varnish, Boost, AuthCache, Memcache Akamai, Amazon CloudFront
  • #24 perlbal, IPVS Squid, HAproxy Varnish, Boost, AuthCache, Memcache Akamai, Amazon CloudFront
  • #25 perlbal, IPVS Squid, HAproxy Varnish, Boost, AuthCache, Memcache Akamai, Amazon CloudFront
  • #29 DRBD (Distributed Replicated Block Device)
  • #30 DRBD (Distributed Replicated Block Device)
  • #31 DRBD (Distributed Replicated Block Device)
  • #32 DRBD (Distributed Replicated Block Device)
  • #33 DRBD (Distributed Replicated Block Device)
  • #34 DRBD (Distributed Replicated Block Device)
  • #35 Infrastructure you have to maintain and pay for!
  • #36 Infrastructure you have to maintain and pay for!
  • #37 Infrastructure you have to maintain and pay for!
  • #38 Infrastructure you have to maintain and pay for!
  • #39 Infrastructure you have to maintain and pay for!
  • #41 Abstraction of a) IT infrastructure, b) locations
  • #42 Abstraction of a) IT infrastructure, b) locations
  • #43 Abstraction of a) IT infrastructure, b) locations
  • #44 Abstraction of a) IT infrastructure, b) locations
  • #52 EC2 instance types: On-demand, Reserved, Spot
  • #60 Instance parameters: Location, Size, EBS and AMI.
  • #61 Instance parameters: Location, Size, EBS and AMI.
  • #62 Instance parameters: Location, Size, EBS and AMI.
  • #63 Instance parameters: Location, Size, EBS and AMI.
  • #64 Instance parameters: Location, Size, EBS and AMI.
  • #65 Instance parameters: Location, Size, EBS and AMI.
  • #73 To operate a cluster infrastructure like I described, you‘ll also need additional services, for ex...
  • #74 To operate a cluster infrastructure like I described, you‘ll also need additional services, for ex...
  • #75 To operate a cluster infrastructure like I described, you‘ll also need additional services, for ex...
  • #76 To operate a cluster infrastructure like I described, you‘ll also need additional services, for ex...
  • #77 To operate a cluster infrastructure like I described, you‘ll also need additional services, for ex...
  • #78 To operate a cluster infrastructure like I described, you‘ll also need additional services, for ex...
  • #79 To operate a cluster infrastructure like I described, you‘ll also need additional services, for ex...
  • #82 Running Drupal on a Cloud service gets you... But to operate a more complex Drupal infrastructure efficiently, you‘ll need... Let‘s spend the rest of the time for questions! First, my question...
  • #83 Running Drupal on a Cloud service gets you... But to operate a more complex Drupal infrastructure efficiently, you‘ll need... Let‘s spend the rest of the time for questions! First, my question...
  • #84 Running Drupal on a Cloud service gets you... But to operate a more complex Drupal infrastructure efficiently, you‘ll need... Let‘s spend the rest of the time for questions! First, my question...
  • #85 Running Drupal on a Cloud service gets you... But to operate a more complex Drupal infrastructure efficiently, you‘ll need... Let‘s spend the rest of the time for questions! First, my question...