SlideShare a Scribd company logo
Dr Clonelove:
HOW I LEARNED TO STOP WORRYING AND LOVE THE CLOUD




Using Amazon's Elastic Computing Cloud ( and a few too many Star Wars analogies)
to create a scalable server infrastructure for School of Everything.
       David O'Dwyer (SupportFour)
       Peter Brownell (Code Positive / School of Everything)
WHAT'S AHEAD
How we built a server cluster on Amazon EC2 for a Drupal based website.
It's all about how to add and remove servers on the fly.

The set up
Why use the cloud ?
An overview of our server infrastructure

How we got started with the cloud
Some sysadmin religious mumbo-jumbo
General best-practice for any cluster

Technology
The key tools to make it happen




                                                       Image by - http://www.flickr.com/photos/powerpig/
THE SILVER LINING
Why choose the cloud ?
Startups are poor
Pay for servers by the hour
Add a new server in a few minutes
Turn them off when not needed




                                    http://flickr.com/photos/balakov/2468552226
SCALE DOWN
Be able to grow and shrink
The key word really is “Elastic”
Know how you will add and remove new servers




                                     Photo credit: http://www.flickr.com/photos/34558813@N07/
BASIC STRUCTURE
Code built on Drupal
Machine images run Debian Lenny
MySQL database with Replication & MySQL proxy
Many custom scripts
TIME FOR AN EYE TEST
    TIME FOR AN EYE TEST
  TIME FOR AN EYE TEST
TIME FOR AN EYE TEST
THE BIG PICTURE
WHAT WE BUILT
Basic configuration – grow as needed

2 web-servers (small instance)
1 primary database (small instance)
2 slave databases
2 off-cloud machines for monitoring and backups
EVERYONA MAKES MISTAKES
Simple concepts to avoid ultimate disasta
THE END
Work Backwards
Non-persistence – all changes lost on power down
Must be able to rebuild everything - automaticallyish
Start with your plan for complete failure
Make sure you can test your backup system
ULTIMATE FAILURE
Assume that everything may just vanish
Be able to rebuild from backups
Document and blog
Fire Drills – practice makes perfect
CLOUD CITY
Never have faith in just one ally
Set up a base off the cloud
Keep a backup on the ground
Monitor from outside
Mail smarthost to avoid auto greylisting
IT'S A TRAP!
What does it look like –
working or not.

Don't trust anything!
Monitor as much as possible
 - Clues for where problems arise
 - Capacity planning

We use Nagios and Munin.
NOAH'S ARK PRINCIPLE:
Expect the worst and have two of everything
Traditionally expensive
Adding new servers takes time
You may just end up with a lot of hardware doing nothing
                        http://www.thebricktestament.com/genesis/the_flood/gn07_07_10.html
IT'S MUCH EASIER WITH CLONES




   Virtual machines are cheap – but you still need to plan
   Configure one original, and make many copies, in multiple zones
   Only pay for the time you use
   Noah says: “It's not having two of everything running, it's being able to”

                                                      http://www.flickr.com/photos/jeremymates/2362399109/
THE PIECES
Putting the cluster together
STORAGE YOU CAN RELY ON
How safe is your data

Local disk – EC2 Ephemeral Storage (/mnt)
EBS - Elastic Block Store
Point-in-time snapshots
CLONE 2 CLONE
  FILESYSTEM
Avoid dependencies

Local copy of uploaded files
GlusterFS syncs files instantly
Primary webserver uses persistent storage



               Image by - http://www.flickr.com/photos/powerpig/
Gluster File System
SMALLER IS BETTER
                                     MySQL(tm) is MyFriend
                                     Database replication – easy and reliable
                                     Multiple small images as database servers
                                     MySql proxy makes cluster transparent




Best practice guide: http://www.mysql.com/why-mysql/white-papers/mysql_wp_best_practices_mysql_ec2.php

MySQL is a registered trademark of MySQL inc, no it's Sun Microsystems,     http://www.flickr.com/photos/powerpig/
no, woops looks like it's Oracle Inc. now. How weird is that ?
Anyway, we like it, and are happy to endorse them – however owns them.
Image by - http://www.flickr.com/photos/powerpig/




THE BALANCING ACT
Round Robin DNS is the cheap solution for load balancing
Each machine configures dynamic DNS on first startup
Investigating new amazon load balancing
WHAT WE SAID
Cloud infrastructure is not alien, it's just a little less solid – it can grow or shrink.
The cloud forces best practice – no time for slacker sysadmins!

Better safe than sorry
Remember Noah, avoid dependencies
Work backwards – rebuild, restore, backup, operate
Keep a base in the real world
Monitor everything

Managing growth
Loads of local storage, persistent elastic blocks, instant snapshots and S3
Synchronise user uploads with GlusterFS
Scale MySQL with replication and MySQL Proxy
Growing number of load balancing options

Mail
Mail smarthost off-cloud to avoid greylisting




                                                                       Image by - http://www.flickr.com/photos/powerpig/
Want to learn more about Amazon Web Services ?
Sign up on School of Everything and tag yourself with AWS.

        http://schoolofeverything.com/subject/AWS




                     http://schoolofeverything.com/




                              http://supportfour.com
Your humble presenters




The Church of Jar Jar paid a visit to the Star Wars Expo in London. They sang and danced,
the cast all queued up for a picture with us. Then they were thrown out.

More Related Content

Recently uploaded

What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptxAI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
Sunil Jagani
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 
Discover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched ContentDiscover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched Content
ScyllaDB
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
Tobias Schneck
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
ScyllaDB
 
AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)
HarpalGohil4
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
ScyllaDB
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
Getting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
Getting the Most Out of ScyllaDB Monitoring: ShareChat's TipsGetting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
Getting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
ScyllaDB
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
christinelarrosa
 
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
GlobalLogic Ukraine
 

Recently uploaded (20)

What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptxAI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 
Discover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched ContentDiscover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched Content
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
 
AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
Getting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
Getting the Most Out of ScyllaDB Monitoring: ShareChat's TipsGetting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
Getting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
 
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Best Practice for getting started with Cloud Computing (EC2, Drupal & MySQL)

  • 1. Dr Clonelove: HOW I LEARNED TO STOP WORRYING AND LOVE THE CLOUD Using Amazon's Elastic Computing Cloud ( and a few too many Star Wars analogies) to create a scalable server infrastructure for School of Everything. David O'Dwyer (SupportFour) Peter Brownell (Code Positive / School of Everything)
  • 2. WHAT'S AHEAD How we built a server cluster on Amazon EC2 for a Drupal based website. It's all about how to add and remove servers on the fly. The set up Why use the cloud ? An overview of our server infrastructure How we got started with the cloud Some sysadmin religious mumbo-jumbo General best-practice for any cluster Technology The key tools to make it happen Image by - http://www.flickr.com/photos/powerpig/
  • 3. THE SILVER LINING Why choose the cloud ? Startups are poor Pay for servers by the hour Add a new server in a few minutes Turn them off when not needed http://flickr.com/photos/balakov/2468552226
  • 4. SCALE DOWN Be able to grow and shrink The key word really is “Elastic” Know how you will add and remove new servers Photo credit: http://www.flickr.com/photos/34558813@N07/
  • 5. BASIC STRUCTURE Code built on Drupal Machine images run Debian Lenny MySQL database with Replication & MySQL proxy Many custom scripts
  • 6. TIME FOR AN EYE TEST TIME FOR AN EYE TEST TIME FOR AN EYE TEST TIME FOR AN EYE TEST
  • 8. WHAT WE BUILT Basic configuration – grow as needed 2 web-servers (small instance) 1 primary database (small instance) 2 slave databases 2 off-cloud machines for monitoring and backups
  • 9. EVERYONA MAKES MISTAKES Simple concepts to avoid ultimate disasta
  • 10. THE END Work Backwards Non-persistence – all changes lost on power down Must be able to rebuild everything - automaticallyish Start with your plan for complete failure Make sure you can test your backup system
  • 11. ULTIMATE FAILURE Assume that everything may just vanish Be able to rebuild from backups Document and blog Fire Drills – practice makes perfect
  • 12. CLOUD CITY Never have faith in just one ally Set up a base off the cloud Keep a backup on the ground Monitor from outside Mail smarthost to avoid auto greylisting
  • 13. IT'S A TRAP! What does it look like – working or not. Don't trust anything! Monitor as much as possible - Clues for where problems arise - Capacity planning We use Nagios and Munin.
  • 14. NOAH'S ARK PRINCIPLE: Expect the worst and have two of everything Traditionally expensive Adding new servers takes time You may just end up with a lot of hardware doing nothing http://www.thebricktestament.com/genesis/the_flood/gn07_07_10.html
  • 15. IT'S MUCH EASIER WITH CLONES Virtual machines are cheap – but you still need to plan Configure one original, and make many copies, in multiple zones Only pay for the time you use Noah says: “It's not having two of everything running, it's being able to” http://www.flickr.com/photos/jeremymates/2362399109/
  • 16. THE PIECES Putting the cluster together
  • 17. STORAGE YOU CAN RELY ON How safe is your data Local disk – EC2 Ephemeral Storage (/mnt) EBS - Elastic Block Store Point-in-time snapshots
  • 18. CLONE 2 CLONE FILESYSTEM Avoid dependencies Local copy of uploaded files GlusterFS syncs files instantly Primary webserver uses persistent storage Image by - http://www.flickr.com/photos/powerpig/
  • 20. SMALLER IS BETTER MySQL(tm) is MyFriend Database replication – easy and reliable Multiple small images as database servers MySql proxy makes cluster transparent Best practice guide: http://www.mysql.com/why-mysql/white-papers/mysql_wp_best_practices_mysql_ec2.php MySQL is a registered trademark of MySQL inc, no it's Sun Microsystems, http://www.flickr.com/photos/powerpig/ no, woops looks like it's Oracle Inc. now. How weird is that ? Anyway, we like it, and are happy to endorse them – however owns them.
  • 21. Image by - http://www.flickr.com/photos/powerpig/ THE BALANCING ACT Round Robin DNS is the cheap solution for load balancing Each machine configures dynamic DNS on first startup Investigating new amazon load balancing
  • 22. WHAT WE SAID Cloud infrastructure is not alien, it's just a little less solid – it can grow or shrink. The cloud forces best practice – no time for slacker sysadmins! Better safe than sorry Remember Noah, avoid dependencies Work backwards – rebuild, restore, backup, operate Keep a base in the real world Monitor everything Managing growth Loads of local storage, persistent elastic blocks, instant snapshots and S3 Synchronise user uploads with GlusterFS Scale MySQL with replication and MySQL Proxy Growing number of load balancing options Mail Mail smarthost off-cloud to avoid greylisting Image by - http://www.flickr.com/photos/powerpig/
  • 23. Want to learn more about Amazon Web Services ? Sign up on School of Everything and tag yourself with AWS. http://schoolofeverything.com/subject/AWS http://schoolofeverything.com/ http://supportfour.com
  • 24. Your humble presenters The Church of Jar Jar paid a visit to the Star Wars Expo in London. They sang and danced, the cast all queued up for a picture with us. Then they were thrown out.