SlideShare une entreprise Scribd logo
1  sur  42
Télécharger pour lire hors ligne
DCAMP




         Cloud to the rescue
         How I learned to stop worrying and love the cloud




         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           1

Sunday, November 18, 12
DCAMP



         About me                                          I pity the fool
                                                          who doesn’t use
                                                               Drupal
         Hi, I’m Alexandru Badiu.
         I’m a software engineer, amateur game
         developer and part time Mister T
         impersonator.

         Drupal user for 9 years, board member in
         Drupal Romania.

         I work for Demotix.

         Twitter @voidberg
         Web ctrlz.ro




         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue                2

Sunday, November 18, 12
DCAMP




                                                      1
                                  The cloud

         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           3

Sunday, November 18, 12
DCAMP



         The cloud
          To the world
          “Cloud computing refers to the delivery of computing and storage capacity as a service to a heterogeneous
          community of end-recipients” - Wikipedia


          To us
          “The cloud is just a buzz word meaning quick to set up VPSs when you need them, perhaps have 'unlimited'
          storage space and even a CDN if your lucky” - Demotix CTO


          Web “2.0”
          Servers - Virtual Private Servers

          Storage - Lots and lots of data

          Delivery - CDNs and other tricks




         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue                                                   4

Sunday, November 18, 12
DCAMP



         The promise
          ‣ New           servers anytime
          ‣ Scale          up and down anytime
          ‣ Unlimited           storage
          ‣ Pay           only for what you use
          ‣ Short          / no contracts
          ‣ Total         control



         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           5

Sunday, November 18, 12
DCAMP



         Demotix
          ‣A      quick 2 minute introduction
          ‣ http://prezi.com/_ugoyxm4qprv/demotixcom-2-

             minutes/
          ‣ Acquired           by Corbis a couple of days ago




         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           6

Sunday, November 18, 12
DCAMP



         Demotix numbers
          ‣   1.5million+ page views a month
          ‣   Very very long tale of content
          ‣   Spikes where we get 100k's views in a single day
          ‣   14 GB+ database
          ‣   1M+ nodes, even more terms (10M+)
          ‣   3-5k new nodes per day
          ‣   200GB+ files directory
          ‣   Some folders have over 750K files
          ‣   80% unauthenticated traffic
          ‣   6k active users

         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           7

Sunday, November 18, 12
DCAMP



         Demotix before the cloud
                                                                        ‣   1 Web server
                                                                            ‣   Varnish
                                                                            ‣   Apache, mod_php
                                                                        ‣   1 Database server
                                                                            ‣   MySQL
                                                                        ‣   1 Util server
                                                                            ‣   Memcached
                                                                            ‣   Solr
                                                                            ‣   FTP Server
                                                                            ‣   Beanstalk

         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue                                   8

Sunday, November 18, 12
DCAMP



         Previous cloud experience
             ‣   Started on the cloud
                 ‣   Prototype and alpha built a cloud
                 ‣   Dev environment still on a cloud
             ‣   Moved off for better support
                 ‣   We needed 24/7 support
                 ‣   Site liked to crash on major Christian holidays
             ‣   Saw a nice speed bump when we did
                 ‣   Better disk IO
                 ‣   Dedicated hardware

         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           9

Sunday, November 18, 12
DCAMP



         Why go back?
             ‣   Spikes
                 ‣   Single story spikes
                     ‣   Breaking images of the Oslo bomb story went viral
                     ‣   Our firewall (not webserver) went into melt down
                 ‣   Event based spikes
                     ‣   Royal wedding
                     ‣   Elections
                     ‣   Olympics
             ‣   Dev = Staging = Production
             ‣   Flexibility

         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue                10

Sunday, November 18, 12
DCAMP



         Dream setup
                                                                        ‣   1+ Load balancer
                                                                            ‣   Varnish
                                                                        ‣   3+ Web servers
                                                                            ‣   Nginx, PHP-FPM
                                                                        ‣   2+ Database servers
                                                                            ‣   MariaDB
                                                                        ‣   2+ Util server
                                                                            ‣   Memcached
                                                                            ‣   Solr
                                                                            ‣   FTP Server
                                                                            ‣   Beanstalk

         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue                                  11

Sunday, November 18, 12
DCAMP



         Why do it yourself?
             Why not pay someone else to figure it out?
             ‣ Control        - SaaS is a blackbox in most cases
             ‣ Complexity             - We did not fit generic solutions
             ‣ If    you can do it, go ahead




         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue             12

Sunday, November 18, 12
DCAMP




                                                    2
                               Challenges

         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           13

Sunday, November 18, 12
DCAMP



         #1 - Disks
             Slice ratio (How big is your share?)
             ‣   Most (but not all) cloud providers slice servers up into equal cpu/
                 ram/disk space chunks and sell them off.
             ‣   Some let you add on resources you need, others don't.
             ‣   Problem for file servers.

             Poor disk IO
             ‣   Are your disks local or over the network?




         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue                  14

Sunday, November 18, 12
DCAMP



         #2 - Location
             Laws
             ‣   EU has laws about where you can send and store users data.
             ‣   Your business may not allow for you to store data in the cloud.



             Users
             ‣   Cloud may not be where your users are.
             ‣   CDNs can help.




         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue                15

Sunday, November 18, 12
DCAMP



         #3 - Support
             More servers, more problems
             ‣   Once your past dedicated use servers (web, db etc) you have to
                 do work on the app to support more servers.



             Help
             ‣   Can you get any? And how fast?
             ‣   How about at 3am?
             ‣   On Christmas day



         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue              16

Sunday, November 18, 12
DCAMP



         #4 - Total control
             You need to be a sysadmin or become one


             Servers crash at 3AM
             ‣   Monitoring systems
             ‣   Emergency instructions
             ‣   Disaster recovery




         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           17

Sunday, November 18, 12
DCAMP



         #5 - 1 != 1
             Cloud providers differ a LOT
             ‣   Different slice rations
             ‣   Different bandwidth allocation methods
             ‣   Different support packages
             ‣   Very different performance



             Overselling
             ‣   Happens a lot


         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           18

Sunday, November 18, 12
DCAMP




                                                     3
                           Benchmarks

         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           19

Sunday, November 18, 12
DCAMP



         Where to start?

                                                                        Benchmarks
                                                                        ‣   Learn to
                                                                            benchmark Drupal
                                                                        ‣   Cloudharmony.com




         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue                          20

Sunday, November 18, 12
DCAMP



         DB benchmarks




         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           21

Sunday, November 18, 12
DCAMP



         Disk/IO benchmarks




         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           22

Sunday, November 18, 12
DCAMP



         Mem/IO benchmarks




         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           23

Sunday, November 18, 12
DCAMP



         CPU benchmarks




         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           24

Sunday, November 18, 12
DCAMP



         Then?
             Make sure they can do what you need
             ‣   CDN?
             ‣   Storage?
             ‣   Good support?
             ‣   Is it going to break the bank?

             Try before you buy
             ‣   If there’s a free testing period, use it
             ‣   Put as close to a 1:1 copy of your site

             Hammer it
             ‣   AB / Siege test the cache system
             ‣   Replay your log files with HTTPERF or Jmeter
             ‣   Monitor the results with Munin/Cacti/NewRelic

         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           25

Sunday, November 18, 12
DCAMP




                                                    4
                                        Storage

         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           26

Sunday, November 18, 12
DCAMP



         Storage
             Storage = sites/*/files
             More than 1 web server
             The slice ratio fails for file servers
             Lots of files in a single directory (10k+)
             https://www.getpantheon.com/news/inside-
             pantheon-valhalla-filesystem



         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           27

Sunday, November 18, 12
DCAMP



         NFS
             Server with big data + NFS
             Tried, tested, works
             Not very exciting
             Single point of failure
             Depending on cloud you could need a 64 GB RAM
             server



         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           28

Sunday, November 18, 12
DCAMP



         API / Gluster
             API storage + Fuse (Cloudfuse, s3fs)
             Theoretically unlimited storage
             Easy CDN

             A bit bleeding edge



             Gluster FS
             Impressive
             Tradeoffs that Drupal doesn’t need

             Complicated but likely worth it

         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           29

Sunday, November 18, 12
DCAMP




                                                     5
                                               CDNs

         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           30

Sunday, November 18, 12
DCAMP



         The problem with CDNs




         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           31

Sunday, November 18, 12
DCAMP



         Types of CDNs
             Push (CloudFiles, Amazon S3)
             No redundant traffic
             Complex setup

             Pull (Lots)
             Very easy to setup
             Lots of redundant traffic

             DNS (Cloudflare / Incapsula)
             Takes over your DNS

             Does much more (analytics, protection, optimization)

         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           32

Sunday, November 18, 12
DCAMP




                                                    6
                  What did we do?

         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           33

Sunday, November 18, 12
DCAMP



         What did we do?


                                                                        We picked Dediserve
                                                                        http://dediserve.com




         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue                        34

Sunday, November 18, 12
DCAMP



         What did we do?
             NFS Storage
             Simple, tried and tested
             Using a NFS mount of raid disks used by all webheads



             CDN Pull
             Very easy to setup
             Dediserve’s OnApp CDN
             Spread assets over several domains (front end performance)



         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue             35

Sunday, November 18, 12
DCAMP



         Our current setup                                              ‣   1 Load balancer
                                                                            ‣   Varnish
                                                                        ‣   4 Web servers
                                                                            ‣   Apache, mod_php
                                                                        ‣   1 Database servers
                                                                            ‣   MariaDB
                                                                        ‣   1 Util server
                                                                            ‣   Memcached
                                                                            ‣   Solr
                                                                            ‣   FTP Server
                                                                            ‣   Beanstalk


         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue                                36

Sunday, November 18, 12
DCAMP




                                                     7
                 Other issues and findings


         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           37

Sunday, November 18, 12
DCAMP



         Lots of files
             Close to 1M files in a single directory
             Wrote custom module to fix this
             Part of the file save hooks it moved the file to a folder structure
             based on the filename
             Will be released on d.o

             Cloudfuse + CDN
             Working proof of concept
             Uses Rackspace’s cloud files for both storage and CDN

             Requires pre-generation of imagecache
             Not published yet

         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue               38

Sunday, November 18, 12
DCAMP



         What we found
             Puppet is awesome
             So is any other build automation system
             Spinning up new test or production servers is very very easy

             Great to setup local dev, stage or merge

             url_alias is dog slow on InnoDB
             Removing the language conditions speeds it up

             Convert term_data’s description to VARCHAR
             MySQL won’t use in memory tables if you query TEXT fields




         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue               39

Sunday, November 18, 12
DCAMP




                                                     8
                            Conclusions

         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           40

Sunday, November 18, 12
DCAMP



         Conclusions
             The Cloud isn't a magic bullet
             Cloud providers differ a LOT
             Benchmarking can help differentiate providers
             The best benchmark is your own app, with replayed
             traffic.
             Storage can be complicated
             CDNs can give you an easy win


         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           41

Sunday, November 18, 12
DCAMP




       Thanks!
       Questions?




       Alexandru Badiu.
       Twitter @voidberg
       Web http://ctrlz.ro

       Email andu@ctrlz.ro

       D.O http://drupal.org/user/8662


         Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue           42

Sunday, November 18, 12

Contenu connexe

En vedette

Powerpoint Para Professores
Powerpoint Para ProfessoresPowerpoint Para Professores
Powerpoint Para Professores
Teresa Pombo
 
Powerpoint Para Professores
Powerpoint Para ProfessoresPowerpoint Para Professores
Powerpoint Para Professores
Teresa Pombo
 
1ª sessão Curso formação "RED's com os Google Earth"
1ª sessão Curso formação "RED's com os Google Earth"1ª sessão Curso formação "RED's com os Google Earth"
1ª sessão Curso formação "RED's com os Google Earth"
Teresa Pombo
 

En vedette (18)

Drupal as a first class mobile platform
Drupal as a first class mobile platformDrupal as a first class mobile platform
Drupal as a first class mobile platform
 
Using Features
Using FeaturesUsing Features
Using Features
 
Powerpoint Para Professores
Powerpoint Para ProfessoresPowerpoint Para Professores
Powerpoint Para Professores
 
Learning the basics of the Drupal API
Learning the basics of the Drupal APILearning the basics of the Drupal API
Learning the basics of the Drupal API
 
Using Features
Using FeaturesUsing Features
Using Features
 
Drupal 8
Drupal 8Drupal 8
Drupal 8
 
Powerpoint Para Professores
Powerpoint Para ProfessoresPowerpoint Para Professores
Powerpoint Para Professores
 
Behavior Driven Development with Drupal
Behavior Driven Development with DrupalBehavior Driven Development with Drupal
Behavior Driven Development with Drupal
 
Rui Horta
Rui HortaRui Horta
Rui Horta
 
Drupal and Solr
Drupal and SolrDrupal and Solr
Drupal and Solr
 
Publish and Subscribe
Publish and SubscribePublish and Subscribe
Publish and Subscribe
 
Drupal, Android and iPhone
Drupal, Android and iPhoneDrupal, Android and iPhone
Drupal, Android and iPhone
 
Andre
AndreAndre
Andre
 
Informatieavond verdun parijs
Informatieavond verdun parijsInformatieavond verdun parijs
Informatieavond verdun parijs
 
EPortfolio 2005 - Verslag aan SenO
EPortfolio 2005 - Verslag aan SenOEPortfolio 2005 - Verslag aan SenO
EPortfolio 2005 - Verslag aan SenO
 
Prezentare Wurbe
Prezentare WurbePrezentare Wurbe
Prezentare Wurbe
 
Helder, 8B
Helder, 8BHelder, 8B
Helder, 8B
 
1ª sessão Curso formação "RED's com os Google Earth"
1ª sessão Curso formação "RED's com os Google Earth"1ª sessão Curso formação "RED's com os Google Earth"
1ª sessão Curso formação "RED's com os Google Earth"
 

Similaire à Cloud to the rescue? How I learned to stop worrying and love the cloud

Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
Patrick Chanezon
 
Make something real for Firefox OS with Mozilla app templates
Make something real  for Firefox OS with Mozilla app templatesMake something real  for Firefox OS with Mozilla app templates
Make something real for Firefox OS with Mozilla app templates
Piotr Zalewa
 
Operating your OpenStack Private Cloud.pdf
Operating your OpenStack Private Cloud.pdfOperating your OpenStack Private Cloud.pdf
Operating your OpenStack Private Cloud.pdf
OpenStack Foundation
 
drbd9_and_drbdmanage_may_2015
drbd9_and_drbdmanage_may_2015drbd9_and_drbdmanage_may_2015
drbd9_and_drbdmanage_may_2015
Alexandre Huynh
 
Prince Building Tech Talk 12102012
Prince Building Tech Talk 12102012Prince Building Tech Talk 12102012
Prince Building Tech Talk 12102012
Andy Parsons
 

Similaire à Cloud to the rescue? How I learned to stop worrying and love the cloud (20)

REST Drupal
REST DrupalREST Drupal
REST Drupal
 
OpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBIT
OpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBITOpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBIT
OpenNebulaConf 2016 - The DRBD SDS for OpenNebula by Philipp Reisner, LINBIT
 
Keeping responsive into the future by Chris mills
Keeping responsive into the future by Chris millsKeeping responsive into the future by Chris mills
Keeping responsive into the future by Chris mills
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry Bootcamp
 
Mad scalability: Scaling when you are not Google
Mad scalability: Scaling when you are not GoogleMad scalability: Scaling when you are not Google
Mad scalability: Scaling when you are not Google
 
Cloud foundry and openstackcloud
Cloud foundry and openstackcloudCloud foundry and openstackcloud
Cloud foundry and openstackcloud
 
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
Cloud Foundry, the Open Platform as a Service - Oscon - July 2012
 
DCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker Containers
 
Make something real for Firefox OS with Mozilla app templates
Make something real  for Firefox OS with Mozilla app templatesMake something real  for Firefox OS with Mozilla app templates
Make something real for Firefox OS with Mozilla app templates
 
Operating your OpenStack Private Cloud.pdf
Operating your OpenStack Private Cloud.pdfOperating your OpenStack Private Cloud.pdf
Operating your OpenStack Private Cloud.pdf
 
Cloud as a Flexible & Collaborative Tool for Creators
Cloud as a Flexible & Collaborative Tool for CreatorsCloud as a Flexible & Collaborative Tool for Creators
Cloud as a Flexible & Collaborative Tool for Creators
 
Adapt and respond: keeping responsive into the future
Adapt and respond: keeping responsive into the futureAdapt and respond: keeping responsive into the future
Adapt and respond: keeping responsive into the future
 
Nagios Conference 2012 - Dave Williams - Embedding Nagios using RaspberyPi
Nagios Conference 2012 - Dave Williams - Embedding Nagios using RaspberyPiNagios Conference 2012 - Dave Williams - Embedding Nagios using RaspberyPi
Nagios Conference 2012 - Dave Williams - Embedding Nagios using RaspberyPi
 
Front-End Optimization (FEO)
Front-End Optimization (FEO)Front-End Optimization (FEO)
Front-End Optimization (FEO)
 
Nagios Conference 2012 - Andrew Widdersheim - Nagios is down boss wants to se...
Nagios Conference 2012 - Andrew Widdersheim - Nagios is down boss wants to se...Nagios Conference 2012 - Andrew Widdersheim - Nagios is down boss wants to se...
Nagios Conference 2012 - Andrew Widdersheim - Nagios is down boss wants to se...
 
It's in the cloud
It's in the cloudIt's in the cloud
It's in the cloud
 
drbd9_and_drbdmanage_may_2015
drbd9_and_drbdmanage_may_2015drbd9_and_drbdmanage_may_2015
drbd9_and_drbdmanage_may_2015
 
Prince Building Tech Talk 12102012
Prince Building Tech Talk 12102012Prince Building Tech Talk 12102012
Prince Building Tech Talk 12102012
 
Data Scotland 2019: You can run SQL Server on AWS
Data Scotland 2019: You can run SQL Server on AWSData Scotland 2019: You can run SQL Server on AWS
Data Scotland 2019: You can run SQL Server on AWS
 
How AngryNerds Convinced Atlassian to Use Magnolia
How AngryNerds Convinced Atlassian to Use MagnoliaHow AngryNerds Convinced Atlassian to Use Magnolia
How AngryNerds Convinced Atlassian to Use Magnolia
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Cloud to the rescue? How I learned to stop worrying and love the cloud

  • 1. DCAMP Cloud to the rescue How I learned to stop worrying and love the cloud Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 1 Sunday, November 18, 12
  • 2. DCAMP About me I pity the fool who doesn’t use Drupal Hi, I’m Alexandru Badiu. I’m a software engineer, amateur game developer and part time Mister T impersonator. Drupal user for 9 years, board member in Drupal Romania. I work for Demotix. Twitter @voidberg Web ctrlz.ro Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 2 Sunday, November 18, 12
  • 3. DCAMP 1 The cloud Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 3 Sunday, November 18, 12
  • 4. DCAMP The cloud To the world “Cloud computing refers to the delivery of computing and storage capacity as a service to a heterogeneous community of end-recipients” - Wikipedia To us “The cloud is just a buzz word meaning quick to set up VPSs when you need them, perhaps have 'unlimited' storage space and even a CDN if your lucky” - Demotix CTO Web “2.0” Servers - Virtual Private Servers Storage - Lots and lots of data Delivery - CDNs and other tricks Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 4 Sunday, November 18, 12
  • 5. DCAMP The promise ‣ New servers anytime ‣ Scale up and down anytime ‣ Unlimited storage ‣ Pay only for what you use ‣ Short / no contracts ‣ Total control Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 5 Sunday, November 18, 12
  • 6. DCAMP Demotix ‣A quick 2 minute introduction ‣ http://prezi.com/_ugoyxm4qprv/demotixcom-2- minutes/ ‣ Acquired by Corbis a couple of days ago Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 6 Sunday, November 18, 12
  • 7. DCAMP Demotix numbers ‣ 1.5million+ page views a month ‣ Very very long tale of content ‣ Spikes where we get 100k's views in a single day ‣ 14 GB+ database ‣ 1M+ nodes, even more terms (10M+) ‣ 3-5k new nodes per day ‣ 200GB+ files directory ‣ Some folders have over 750K files ‣ 80% unauthenticated traffic ‣ 6k active users Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 7 Sunday, November 18, 12
  • 8. DCAMP Demotix before the cloud ‣ 1 Web server ‣ Varnish ‣ Apache, mod_php ‣ 1 Database server ‣ MySQL ‣ 1 Util server ‣ Memcached ‣ Solr ‣ FTP Server ‣ Beanstalk Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 8 Sunday, November 18, 12
  • 9. DCAMP Previous cloud experience ‣ Started on the cloud ‣ Prototype and alpha built a cloud ‣ Dev environment still on a cloud ‣ Moved off for better support ‣ We needed 24/7 support ‣ Site liked to crash on major Christian holidays ‣ Saw a nice speed bump when we did ‣ Better disk IO ‣ Dedicated hardware Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 9 Sunday, November 18, 12
  • 10. DCAMP Why go back? ‣ Spikes ‣ Single story spikes ‣ Breaking images of the Oslo bomb story went viral ‣ Our firewall (not webserver) went into melt down ‣ Event based spikes ‣ Royal wedding ‣ Elections ‣ Olympics ‣ Dev = Staging = Production ‣ Flexibility Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 10 Sunday, November 18, 12
  • 11. DCAMP Dream setup ‣ 1+ Load balancer ‣ Varnish ‣ 3+ Web servers ‣ Nginx, PHP-FPM ‣ 2+ Database servers ‣ MariaDB ‣ 2+ Util server ‣ Memcached ‣ Solr ‣ FTP Server ‣ Beanstalk Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 11 Sunday, November 18, 12
  • 12. DCAMP Why do it yourself? Why not pay someone else to figure it out? ‣ Control - SaaS is a blackbox in most cases ‣ Complexity - We did not fit generic solutions ‣ If you can do it, go ahead Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 12 Sunday, November 18, 12
  • 13. DCAMP 2 Challenges Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 13 Sunday, November 18, 12
  • 14. DCAMP #1 - Disks Slice ratio (How big is your share?) ‣ Most (but not all) cloud providers slice servers up into equal cpu/ ram/disk space chunks and sell them off. ‣ Some let you add on resources you need, others don't. ‣ Problem for file servers. Poor disk IO ‣ Are your disks local or over the network? Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 14 Sunday, November 18, 12
  • 15. DCAMP #2 - Location Laws ‣ EU has laws about where you can send and store users data. ‣ Your business may not allow for you to store data in the cloud. Users ‣ Cloud may not be where your users are. ‣ CDNs can help. Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 15 Sunday, November 18, 12
  • 16. DCAMP #3 - Support More servers, more problems ‣ Once your past dedicated use servers (web, db etc) you have to do work on the app to support more servers. Help ‣ Can you get any? And how fast? ‣ How about at 3am? ‣ On Christmas day Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 16 Sunday, November 18, 12
  • 17. DCAMP #4 - Total control You need to be a sysadmin or become one Servers crash at 3AM ‣ Monitoring systems ‣ Emergency instructions ‣ Disaster recovery Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 17 Sunday, November 18, 12
  • 18. DCAMP #5 - 1 != 1 Cloud providers differ a LOT ‣ Different slice rations ‣ Different bandwidth allocation methods ‣ Different support packages ‣ Very different performance Overselling ‣ Happens a lot Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 18 Sunday, November 18, 12
  • 19. DCAMP 3 Benchmarks Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 19 Sunday, November 18, 12
  • 20. DCAMP Where to start? Benchmarks ‣ Learn to benchmark Drupal ‣ Cloudharmony.com Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 20 Sunday, November 18, 12
  • 21. DCAMP DB benchmarks Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 21 Sunday, November 18, 12
  • 22. DCAMP Disk/IO benchmarks Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 22 Sunday, November 18, 12
  • 23. DCAMP Mem/IO benchmarks Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 23 Sunday, November 18, 12
  • 24. DCAMP CPU benchmarks Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 24 Sunday, November 18, 12
  • 25. DCAMP Then? Make sure they can do what you need ‣ CDN? ‣ Storage? ‣ Good support? ‣ Is it going to break the bank? Try before you buy ‣ If there’s a free testing period, use it ‣ Put as close to a 1:1 copy of your site Hammer it ‣ AB / Siege test the cache system ‣ Replay your log files with HTTPERF or Jmeter ‣ Monitor the results with Munin/Cacti/NewRelic Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 25 Sunday, November 18, 12
  • 26. DCAMP 4 Storage Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 26 Sunday, November 18, 12
  • 27. DCAMP Storage Storage = sites/*/files More than 1 web server The slice ratio fails for file servers Lots of files in a single directory (10k+) https://www.getpantheon.com/news/inside- pantheon-valhalla-filesystem Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 27 Sunday, November 18, 12
  • 28. DCAMP NFS Server with big data + NFS Tried, tested, works Not very exciting Single point of failure Depending on cloud you could need a 64 GB RAM server Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 28 Sunday, November 18, 12
  • 29. DCAMP API / Gluster API storage + Fuse (Cloudfuse, s3fs) Theoretically unlimited storage Easy CDN A bit bleeding edge Gluster FS Impressive Tradeoffs that Drupal doesn’t need Complicated but likely worth it Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 29 Sunday, November 18, 12
  • 30. DCAMP 5 CDNs Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 30 Sunday, November 18, 12
  • 31. DCAMP The problem with CDNs Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 31 Sunday, November 18, 12
  • 32. DCAMP Types of CDNs Push (CloudFiles, Amazon S3) No redundant traffic Complex setup Pull (Lots) Very easy to setup Lots of redundant traffic DNS (Cloudflare / Incapsula) Takes over your DNS Does much more (analytics, protection, optimization) Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 32 Sunday, November 18, 12
  • 33. DCAMP 6 What did we do? Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 33 Sunday, November 18, 12
  • 34. DCAMP What did we do? We picked Dediserve http://dediserve.com Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 34 Sunday, November 18, 12
  • 35. DCAMP What did we do? NFS Storage Simple, tried and tested Using a NFS mount of raid disks used by all webheads CDN Pull Very easy to setup Dediserve’s OnApp CDN Spread assets over several domains (front end performance) Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 35 Sunday, November 18, 12
  • 36. DCAMP Our current setup ‣ 1 Load balancer ‣ Varnish ‣ 4 Web servers ‣ Apache, mod_php ‣ 1 Database servers ‣ MariaDB ‣ 1 Util server ‣ Memcached ‣ Solr ‣ FTP Server ‣ Beanstalk Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 36 Sunday, November 18, 12
  • 37. DCAMP 7 Other issues and findings Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 37 Sunday, November 18, 12
  • 38. DCAMP Lots of files Close to 1M files in a single directory Wrote custom module to fix this Part of the file save hooks it moved the file to a folder structure based on the filename Will be released on d.o Cloudfuse + CDN Working proof of concept Uses Rackspace’s cloud files for both storage and CDN Requires pre-generation of imagecache Not published yet Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 38 Sunday, November 18, 12
  • 39. DCAMP What we found Puppet is awesome So is any other build automation system Spinning up new test or production servers is very very easy Great to setup local dev, stage or merge url_alias is dog slow on InnoDB Removing the language conditions speeds it up Convert term_data’s description to VARCHAR MySQL won’t use in memory tables if you query TEXT fields Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 39 Sunday, November 18, 12
  • 40. DCAMP 8 Conclusions Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 40 Sunday, November 18, 12
  • 41. DCAMP Conclusions The Cloud isn't a magic bullet Cloud providers differ a LOT Benchmarking can help differentiate providers The best benchmark is your own app, with replayed traffic. Storage can be complicated CDNs can give you an easy win Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 41 Sunday, November 18, 12
  • 42. DCAMP Thanks! Questions? Alexandru Badiu. Twitter @voidberg Web http://ctrlz.ro Email andu@ctrlz.ro D.O http://drupal.org/user/8662 Drupalcamp Arad 2012 - Alexandru Badiu - Cloud to the rescue 42 Sunday, November 18, 12