Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Production: Designing for Testability

Production: Designing for Testability

A major part of our lives is working safely with production - yet few organizations today are designing production to enable higher quality and end to end verification of the code we write and deploy. In this talk, we build on the foundation of great microservice architectures to include the first class design of testability as one of the most important artifacts that high velocity and high-quality teams should consider. In particular, we’ll explore what it’s like to build quality software with no development, QA, or staging environments. We'll include a deep dive into “verification in production” and what it really takes to build software that can safely be tested continuously in production. Let’s build developer happiness by *knowing* production is correct.

Michael Bryzek

June 27, 2017
Tweet

More Decks by Michael Bryzek

Other Decks in Technology

Transcript

  1. Software Quality is Hard Think end to end for entire

    lifecycle of code Verification in Production is a powerful technique to help us build quality software
  2. True Continuous Delivery Automated tests / No safeguards 1 way

    to do something Assume Continuous Delivery in Design Process github.com/flowcommerce/delta
  3. Quality Through Architecture Extreme Isolation • Rich event streams •

    Own DNS, load balancer • Private database • No consul/zk/shared state • Stop cascading failures • “Delay” not “Outage”
  4. Example: Know That Checkout Works Bot places an order every

    few minutes Identify test orders and immediately cancel
  5. Example: Support “Sandbox” Accounts ”SaaS” – even for internal accounts

    Mark individual accounts as sandbox One API Key for all sandbox accounts "every service is a third party"
  6. Example: End to End Integration Tests Create Sandbox Org Run

    tests Delete Sandbox Org “Safe and Repeatable”
  7. Considerations Make production access explicit (not the default) Use defined

    paths (e.g. API calls) Restrict sensitive data Design for side effects
  8. Tooling: API | Builder (formerly known as apidoc) 28 www.apibuilder.io

    Version control for APIs Backwards Compatibility High Quality Mocks
  9. High Quality Mocks – From Specs Full Mock Generated Implement

    Only What You Need To Test www.apibuilder.io
  10. Key Takeaways – Design Production to be Testable Trust your

    tests, run subset in production Invest in continuous delivery Sandbox accounts are powerful High quality, trustworthy mocks Real-time feedback from production
  11. Example: Deploy, Then Release Separate deploy from real traffic Rollout

    incrementally Splitter - https://github.com/ebowman/splitter