SlideShare a Scribd company logo
1 of 43
Production is a Bitch
Some deployments got very
   well and wow we’re
awesome and feel great and
      LETS PARTY!
Some deployments go
    poorly and wreck
weekends and make us feel
 bad and lets drown our
        sorrows
We do both,
but we’re learning
Troublesome deployments
  usually fail in two ways
Your code doesn’t work*

* more on this later
Your code doesn’t scale*

* also more later
Good deployments are
 usually based on two
       principles
Developed with the right
       mindset
Developed with good
     technique
The mindset is the more
    important part
“She was one in a million, yeah.
  So there’s five more, just in
      New South Wales”
The Whitlams
Always expect the worst
and you’ll only get happy
       surprises
Play the averages
24 Hours
332 Error Pages Served
1,690,671 Total Requests
0.019%
your code doesn’t work
“But it passes QA/CI/
Acceptance/whatever”
Continuous Integration is a
     dress rehearsal
“It’s some thing wrong with
 the framework or linux or
     ruby or something”
You’ve probably just
written something retarded
... except when you haven’t
 and there’s some obscure
 one in a million MySql bug
your code doesn’t scale
does it even matter?
Average Response Time

       139ms
Maximum Response Time

      87,997ms
“using an RDBMS means
 your design is wrong”

Ben Schwarz
Bullshit.
“crying yourself to sleep
every night means your
    design is wrong”
The correct answer to
every question relating to
 maintenance, scalability,
 reliability, availability is:
It depends.
...that being said, there are
some very good guidelines
and techniques that rarely
          go wrong
Write noisy code
Fail loudly and fast
and make sure you’re
     listening
Hoptoad
 Get Exceptional
   New Relic
ExceptionNotifer
Write unit tests for
production and hook up
  alerting for failures
Measure, then change
New Relic is ace.
ruby-prof
    railsbench
Benchmark (stdlib)
         ab
Write slow, clean code

See what’s slow and how

     Make that fast
http://envato.com
http://whoisjohnbarton.com

      @johnbarton

More Related Content

What's hot

What's hot (11)

Debugging
DebuggingDebugging
Debugging
 
Tis The Season: Load Testing Tips and Checklist for Retail Seasonal Readiness
Tis The Season: Load Testing Tips and Checklist for Retail Seasonal ReadinessTis The Season: Load Testing Tips and Checklist for Retail Seasonal Readiness
Tis The Season: Load Testing Tips and Checklist for Retail Seasonal Readiness
 
Django Hosting
Django HostingDjango Hosting
Django Hosting
 
Improving the Daily Life of an IT admin – 3 Common Scenarios Solved
Improving the Daily Life of an IT admin – 3 Common Scenarios SolvedImproving the Daily Life of an IT admin – 3 Common Scenarios Solved
Improving the Daily Life of an IT admin – 3 Common Scenarios Solved
 
Pownce Lessons Learned
Pownce Lessons LearnedPownce Lessons Learned
Pownce Lessons Learned
 
Proactive Support with Watchman Monitoring - PSU 2016
Proactive Support with Watchman Monitoring - PSU 2016Proactive Support with Watchman Monitoring - PSU 2016
Proactive Support with Watchman Monitoring - PSU 2016
 
DevOps and Performance - Why, How and Best Practices - DevOps Meetup Sydney
DevOps and Performance - Why, How and Best Practices - DevOps Meetup SydneyDevOps and Performance - Why, How and Best Practices - DevOps Meetup Sydney
DevOps and Performance - Why, How and Best Practices - DevOps Meetup Sydney
 
How to Pass CCIE in first Attempt? Tips by CCIE Experts
How to Pass CCIE in first Attempt? Tips by CCIE ExpertsHow to Pass CCIE in first Attempt? Tips by CCIE Experts
How to Pass CCIE in first Attempt? Tips by CCIE Experts
 
VMUG - Picking Up New Skills - Tips and Tricks to Build Your Technical Tool C...
VMUG - Picking Up New Skills - Tips and Tricks to Build Your Technical Tool C...VMUG - Picking Up New Skills - Tips and Tricks to Build Your Technical Tool C...
VMUG - Picking Up New Skills - Tips and Tricks to Build Your Technical Tool C...
 
Nhu Viet Nguyen "Why C++ is Becoming a Necessity for QA Automation"
Nhu Viet Nguyen "Why C++ is Becoming a Necessity for QA Automation"Nhu Viet Nguyen "Why C++ is Becoming a Necessity for QA Automation"
Nhu Viet Nguyen "Why C++ is Becoming a Necessity for QA Automation"
 
Brain Sketching
Brain SketchingBrain Sketching
Brain Sketching
 

Similar to Production is a bitch

Automating good coding practices
Automating good coding practicesAutomating good coding practices
Automating good coding practices
Kevin Peterson
 
How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....
Mike Harris
 

Similar to Production is a bitch (20)

Workshop fight legacy code write unit test
Workshop fight legacy code write unit testWorkshop fight legacy code write unit test
Workshop fight legacy code write unit test
 
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015][XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
 
How to write bad code using C#
How to write bad code using C#How to write bad code using C#
How to write bad code using C#
 
DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012
DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012
DevOpsSec: Appling DevOps Principles to Security, DevOpsDays Austin 2012
 
Automating good coding practices
Automating good coding practicesAutomating good coding practices
Automating good coding practices
 
10 Big Ideas from Industry
10 Big Ideas from Industry10 Big Ideas from Industry
10 Big Ideas from Industry
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
 
How HipChat Ships and Recovers Fast with DevOps Practices
How HipChat Ships and Recovers Fast with DevOps PracticesHow HipChat Ships and Recovers Fast with DevOps Practices
How HipChat Ships and Recovers Fast with DevOps Practices
 
Agile Software Development for Non-Developers
Agile Software Development for Non-DevelopersAgile Software Development for Non-Developers
Agile Software Development for Non-Developers
 
How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....
 
My journey as a developer
My journey as a developerMy journey as a developer
My journey as a developer
 
Tdd
TddTdd
Tdd
 
7 Wastes of Software Development
7 Wastes of Software Development7 Wastes of Software Development
7 Wastes of Software Development
 
Test Driven Development - a gentle introduction
Test Driven Development - a gentle introductionTest Driven Development - a gentle introduction
Test Driven Development - a gentle introduction
 
11 rules for programmer should live by
11 rules for programmer should live by11 rules for programmer should live by
11 rules for programmer should live by
 
Scaling a High Traffic Web Application: Our Journey from Java to PHP
Scaling a High Traffic Web Application: Our Journey from Java to PHPScaling a High Traffic Web Application: Our Journey from Java to PHP
Scaling a High Traffic Web Application: Our Journey from Java to PHP
 
Scaling High Traffic Web Applications
Scaling High Traffic Web ApplicationsScaling High Traffic Web Applications
Scaling High Traffic Web Applications
 
Zero to Test Driven Infrastructure
Zero to Test Driven Infrastructure Zero to Test Driven Infrastructure
Zero to Test Driven Infrastructure
 
Agile code quality metrics
Agile code quality metricsAgile code quality metrics
Agile code quality metrics
 
DevDay.lk - Bare Knuckle Web Development
DevDay.lk - Bare Knuckle Web DevelopmentDevDay.lk - Bare Knuckle Web Development
DevDay.lk - Bare Knuckle Web Development
 

More from John Barton

More from John Barton (10)

GopherCon 2014 Recap for Melbourne Go Group
GopherCon 2014 Recap for Melbourne Go GroupGopherCon 2014 Recap for Melbourne Go Group
GopherCon 2014 Recap for Melbourne Go Group
 
Minimum Viable Architecture For Web Apps
Minimum Viable Architecture For Web AppsMinimum Viable Architecture For Web Apps
Minimum Viable Architecture For Web Apps
 
Webscale for the rest of us ruby conf 2013
Webscale for the rest of us   ruby conf 2013Webscale for the rest of us   ruby conf 2013
Webscale for the rest of us ruby conf 2013
 
HTML Emails in Rails 3
HTML Emails in Rails 3HTML Emails in Rails 3
HTML Emails in Rails 3
 
Envato Dev Ops - Alt.Net Melbourne
Envato Dev Ops - Alt.Net MelbourneEnvato Dev Ops - Alt.Net Melbourne
Envato Dev Ops - Alt.Net Melbourne
 
Dev Ops @ Envato
Dev Ops @ EnvatoDev Ops @ Envato
Dev Ops @ Envato
 
Lean Manufacturing and Thought Experiments
Lean Manufacturing and Thought ExperimentsLean Manufacturing and Thought Experiments
Lean Manufacturing and Thought Experiments
 
Lazy Loading and Object Proxying Shenangians
Lazy Loading and Object Proxying ShenangiansLazy Loading and Object Proxying Shenangians
Lazy Loading and Object Proxying Shenangians
 
Ruby Nuby Session - Rails Intro
Ruby Nuby Session - Rails IntroRuby Nuby Session - Rails Intro
Ruby Nuby Session - Rails Intro
 
Alltimetop5 @ Webjam, ReMix 07
Alltimetop5 @ Webjam, ReMix 07Alltimetop5 @ Webjam, ReMix 07
Alltimetop5 @ Webjam, ReMix 07
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

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
 
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...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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)
 
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
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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...
 
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
 
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...
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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?
 

Production is a bitch

Editor's Notes