Why You Might Not Need Yet Another Environment

Why You Might Not Need Yet Another Environment

Multiple environments are a staple of software development projects, but do they actually help us make better software? Do they help us get it into the hands of customers faster? In this talk, I look at the goal of every development team -- delivering quality software. I review how environments have historically helped achieve this goal as well as the problems they have caused along the way. Finally, I look at alternative techniques that can be used in lieu of environments.

17950202cc7be133e80a45580077ed72?s=128

bradgignac

April 14, 2015
Tweet

Transcript

  1. WHY YOU MIGHT NOT NEED YET ANOTHER ENVIRONMENT @bradgignac

  2. Deliver Quality Software The Goal:

  3. Development Production

  4. Development Production Staging

  5. What’s the big deal?

  6. Environments drift.

  7. Environments lie.

  8. Environments multiply.

  9. Development Production Staging

  10. Development DI CI Test Staging Production Stable

  11. Development DI CI Test Staging Production Stable Development DI CI

    Test Staging Production Stable Development DI CI Test Staging Production Stable Development DI CI Test Staging Production Stable Development DI CI Test Staging Production Stable
  12. Environments are expensive.

  13. We have more tools available. Good News:

  14. Feature Flags if feature.IsEnabled("newWidget") { widget := widget.New() } else

    { widget := widget.Old() } widget.Render()
  15. Team Shipping if user.IsInGroup("my-team") { widget := widget.New() } else

    { widget := widget.Old() } widget.Render();
  16. Phased Rollout if user.IsInPercentage(10) { widget := widget.New() } else

    { widget := widget.Old() } widget.Render();
  17. Parallel Code Paths Request Old Code New Code Compare Results

    Persist (Old Result) Graphite
  18. Parallel Code Paths 0 25 50 75 100 2:00 2:30

    3:00 3:30 4:00 4:30 5:00 5:30 6:00 6:30 7:00 7:30 8:00 8:30 9:00 9:30 10:00 Total Mismatch
  19. Parallel Code Paths Request Old Code New Code Compare Results

    Persist (New Result) Graphite
  20. Canary v1 v1 v1 v1 v1 v1 v1 v1 Standby

    DC Production DC Release
  21. Canary v2 v2 v2 v2 v1 v1 v1 v1 Standby

    DC Production DC Release
  22. Canary v2 v2 v2 v2 v2 v2 v2 v2 Standby

    DC Production DC Release
  23. Blue-Green Deployments Load Balancer v1 v1 v1 v1 v2 v2

    v2 v2 100% 0%
  24. Blue-Green Deployments Load Balancer v1 v1 v1 v1 v2 v2

    v2 v2 50% 50%
  25. Blue-Green Deployments Load Balancer v1 v1 v1 v1 v2 v2

    v2 v2 0% 100%
  26. No Free Lunch Increased operation complexity. Automated deployment pipeline. Centralized

    logging and metrics.
  27. Happy Accidents Everything is automated. Experimentation is built-in. Disaster recovery

    is built-in.
  28. Lessons Learned Test everything. Measure everything. Feature flags by default.

    Operational viability matters. Team culture matters most.
  29. DO YOU REALLY NEED YET ANOTHER ENVIRONMENT

  30. Questions?