SlideShare a Scribd company logo
@smathieurainforest
Deployment:!
tips and tricks
@smathieurainforest
Why?
Deployments are scary
Major cause of downtime
Wasted time
@smathieurainforest
About
@smathieu
“We only deploy 20 times per day”
@smathieurainforest
Tip #1
@smathieurainforest
@smathieurainforest
Tip #2
@smathieurainforest
Have a staging server
rainforest @smathieu
@smathieurainforest
Tip #3
@smathieurainforest
@smathieurainforest
Tip #4
@smathieurainforest
Deploying Without Downtime
@smathieurainforest
Migrations
Major challenge to get right
It gets harder with data
@smathieurainforest
ActiveRecord’s Column Cache
@smathieurainforest
@smathieurainforest
Don’t delete columns
rename_column :users, :notes, :deprecated_notes
_2014_01_01
@smathieurainforest
Adding Indexes
Slows on large tables
Locks the table
@smathieurainforest
Postgres
CREATE INDEX CONCURRENTLY
@smathieurainforest
MySQL
Percona Toolkit:
http://www.percona.com/software/percona-toolkit
Facebook’s Online Schema Change:
https://www.facebook.com/notes/mysql-at-
facebook/online-schema-change-for-mysql/
430801045932
@smathieurainforest
Renaming Columns
Don’t do it
@smathieurainforest
@smathieurainforest
Tip #5
@smathieurainforest
Having a staging server is
nice, but…
@smathieurainforest
… on demand staging is
better
@smathieurainforest
And many more…
@smathieurainforest
Conclusion
Your CI should be the only thing deploying your
code
No-Downtime Deployments are harder, but
possible
Invest in your deployment processes
rainforest @smathieu
Questions?
@smathieurainforest
Links
https://github.com/jipiboily/fourchette
https://www.facebook.com/notes/mysql-at-facebook/online-
schema-change-for-mysql/430801045932
http://www.percona.com/software/percona-toolkit

More Related Content

Similar to Rails meetup deployments tricks

Java Performance Mistakes
Java Performance MistakesJava Performance Mistakes
Java Performance Mistakes
Andreas Grabner
 
Old Tech to Shiny New Tech: Strategies on Upgrading Your Code Without a Big Bang
Old Tech to Shiny New Tech: Strategies on Upgrading Your Code Without a Big BangOld Tech to Shiny New Tech: Strategies on Upgrading Your Code Without a Big Bang
Old Tech to Shiny New Tech: Strategies on Upgrading Your Code Without a Big Bang
Cristina Ruth
 
High availability in IT: AAAARGH
High availability in IT: AAAARGHHigh availability in IT: AAAARGH
High availability in IT: AAAARGH
Mattias Geniar
 
Restricting Access to Content by User in Tableau
 Restricting Access to Content by User in Tableau Restricting Access to Content by User in Tableau
Restricting Access to Content by User in Tableau
Senturus
 
Revving Tableau Server Performance: Performance Degradation Causes and Cures
Revving Tableau Server Performance: Performance Degradation Causes and Cures Revving Tableau Server Performance: Performance Degradation Causes and Cures
Revving Tableau Server Performance: Performance Degradation Causes and Cures
Senturus
 
From big data to AI, power your data with OVHcloud solutions
From big data to AI, power your data with OVHcloud solutionsFrom big data to AI, power your data with OVHcloud solutions
From big data to AI, power your data with OVHcloud solutions
OVHcloud
 
How to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance TipsHow to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance Tips
Andreas Grabner
 
Tools, Tips and Techniques for Developing Real-time Apps. Phil Leggetter
Tools, Tips and Techniques for Developing Real-time Apps. Phil LeggetterTools, Tips and Techniques for Developing Real-time Apps. Phil Leggetter
Tools, Tips and Techniques for Developing Real-time Apps. Phil Leggetter
Future Insights
 
Version Control in Machine Learning + AI (Stanford)
Version Control in Machine Learning + AI (Stanford)Version Control in Machine Learning + AI (Stanford)
Version Control in Machine Learning + AI (Stanford)
Anand Sampat
 
Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive

Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive


Cloudera, Inc.
 
Applying principles of chaos engineering to serverless (O'Reilly Software Arc...
Applying principles of chaos engineering to serverless (O'Reilly Software Arc...Applying principles of chaos engineering to serverless (O'Reilly Software Arc...
Applying principles of chaos engineering to serverless (O'Reilly Software Arc...
Yan Cui
 
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Andreas Grabner
 
Tp link error codes
Tp link error codesTp link error codes
Fun with ruby and redis, arrrrcamp edition, javier_ramirez, teowaki
Fun with ruby and redis, arrrrcamp edition, javier_ramirez, teowakiFun with ruby and redis, arrrrcamp edition, javier_ramirez, teowaki
Fun with ruby and redis, arrrrcamp edition, javier_ramirez, teowaki
javier ramirez
 
Query Optimization with MySQL 8.0 and MariaDB 10.3: The Basics
Query Optimization with MySQL 8.0 and MariaDB 10.3: The BasicsQuery Optimization with MySQL 8.0 and MariaDB 10.3: The Basics
Query Optimization with MySQL 8.0 and MariaDB 10.3: The Basics
Jaime Crespo
 
IWMW 2009: Lightweight Web Management
IWMW 2009: Lightweight Web ManagementIWMW 2009: Lightweight Web Management
IWMW 2009: Lightweight Web Management
IWMW
 
cloudera Apache Kudu Updatable Analytical Storage for Modern Data Platform
cloudera Apache Kudu Updatable Analytical Storage for Modern Data Platformcloudera Apache Kudu Updatable Analytical Storage for Modern Data Platform
cloudera Apache Kudu Updatable Analytical Storage for Modern Data Platform
Rakuten Group, Inc.
 
Plant Manager Reference document
Plant Manager Reference documentPlant Manager Reference document
Plant Manager Reference document
Niraj M Wanikar
 

Similar to Rails meetup deployments tricks (20)

Java Performance Mistakes
Java Performance MistakesJava Performance Mistakes
Java Performance Mistakes
 
Old Tech to Shiny New Tech: Strategies on Upgrading Your Code Without a Big Bang
Old Tech to Shiny New Tech: Strategies on Upgrading Your Code Without a Big BangOld Tech to Shiny New Tech: Strategies on Upgrading Your Code Without a Big Bang
Old Tech to Shiny New Tech: Strategies on Upgrading Your Code Without a Big Bang
 
High availability in IT: AAAARGH
High availability in IT: AAAARGHHigh availability in IT: AAAARGH
High availability in IT: AAAARGH
 
Restricting Access to Content by User in Tableau
 Restricting Access to Content by User in Tableau Restricting Access to Content by User in Tableau
Restricting Access to Content by User in Tableau
 
Revving Tableau Server Performance: Performance Degradation Causes and Cures
Revving Tableau Server Performance: Performance Degradation Causes and Cures Revving Tableau Server Performance: Performance Degradation Causes and Cures
Revving Tableau Server Performance: Performance Degradation Causes and Cures
 
From big data to AI, power your data with OVHcloud solutions
From big data to AI, power your data with OVHcloud solutionsFrom big data to AI, power your data with OVHcloud solutions
From big data to AI, power your data with OVHcloud solutions
 
ImmixVegas
ImmixVegasImmixVegas
ImmixVegas
 
How to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance TipsHow to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance Tips
 
Tools, Tips and Techniques for Developing Real-time Apps. Phil Leggetter
Tools, Tips and Techniques for Developing Real-time Apps. Phil LeggetterTools, Tips and Techniques for Developing Real-time Apps. Phil Leggetter
Tools, Tips and Techniques for Developing Real-time Apps. Phil Leggetter
 
Version Control in Machine Learning + AI (Stanford)
Version Control in Machine Learning + AI (Stanford)Version Control in Machine Learning + AI (Stanford)
Version Control in Machine Learning + AI (Stanford)
 
Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive

Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive


 
Applying principles of chaos engineering to serverless (O'Reilly Software Arc...
Applying principles of chaos engineering to serverless (O'Reilly Software Arc...Applying principles of chaos engineering to serverless (O'Reilly Software Arc...
Applying principles of chaos engineering to serverless (O'Reilly Software Arc...
 
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
Top .NET, Java & Web Performance Mistakes - Meetup Jan 2015
 
Tp link error codes
Tp link error codesTp link error codes
Tp link error codes
 
Fun with ruby and redis, arrrrcamp edition, javier_ramirez, teowaki
Fun with ruby and redis, arrrrcamp edition, javier_ramirez, teowakiFun with ruby and redis, arrrrcamp edition, javier_ramirez, teowaki
Fun with ruby and redis, arrrrcamp edition, javier_ramirez, teowaki
 
Query Optimization with MySQL 8.0 and MariaDB 10.3: The Basics
Query Optimization with MySQL 8.0 and MariaDB 10.3: The BasicsQuery Optimization with MySQL 8.0 and MariaDB 10.3: The Basics
Query Optimization with MySQL 8.0 and MariaDB 10.3: The Basics
 
IWMW 2009: Lightweight Web Management
IWMW 2009: Lightweight Web ManagementIWMW 2009: Lightweight Web Management
IWMW 2009: Lightweight Web Management
 
cloudera Apache Kudu Updatable Analytical Storage for Modern Data Platform
cloudera Apache Kudu Updatable Analytical Storage for Modern Data Platformcloudera Apache Kudu Updatable Analytical Storage for Modern Data Platform
cloudera Apache Kudu Updatable Analytical Storage for Modern Data Platform
 
Report On HMS
Report On HMSReport On HMS
Report On HMS
 
Plant Manager Reference document
Plant Manager Reference documentPlant Manager Reference document
Plant Manager Reference document
 

Recently uploaded

Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
abdulrafaychaudhry
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 

Recently uploaded (20)

Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 

Rails meetup deployments tricks