SlideShare a Scribd company logo
1 of 24
Download to read offline
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

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
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 2024The Digital Insurer
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
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)wesley chun
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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...Drew Madelung
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
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 Scriptwesley chun
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Recently uploaded (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
+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...
 
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
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
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)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

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 HubspotMarius 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 ChatGPTExpeed 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 EngineeringsPixeldarts
 
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 HealthThinkNow
 
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.pdfmarketingartwork
 
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 2024Neil 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 2024Albert 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 InsightsKurio // 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 2024Search 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 summarySpeakerHub
 
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 IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit 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 managementMindGenius
 
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.