$30 off During Our Annual Pro Sale. View Details »

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.

bradgignac

April 14, 2015
Tweet

More Decks by bradgignac

Other Decks in Programming

Transcript

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

    View Slide

  2. Deliver Quality Software
    The Goal:

    View Slide

  3. Development Production

    View Slide

  4. Development Production
    Staging

    View Slide

  5. What’s the big deal?

    View Slide

  6. Environments drift.

    View Slide

  7. Environments lie.

    View Slide

  8. Environments multiply.

    View Slide

  9. Development Production
    Staging

    View Slide

  10. Development DI CI Test Staging Production Stable

    View Slide

  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

    View Slide

  12. Environments are expensive.

    View Slide

  13. We have more tools available.
    Good News:

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  17. Parallel Code Paths
    Request
    Old Code
    New Code
    Compare
    Results
    Persist
    (Old Result)
    Graphite

    View Slide

  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

    View Slide

  19. Parallel Code Paths
    Request
    Old Code
    New Code
    Compare
    Results
    Persist
    (New Result)
    Graphite

    View Slide

  20. Canary
    v1 v1
    v1 v1
    v1 v1
    v1 v1
    Standby DC Production DC
    Release

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  26. No Free Lunch
    Increased operation complexity.
    Automated deployment pipeline.
    Centralized logging and metrics.

    View Slide

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

    View Slide

  28. Lessons Learned
    Test everything.
    Measure everything.
    Feature flags by default.
    Operational viability matters.
    Team culture matters most.

    View Slide

  29. DO YOU REALLY NEED
    YET ANOTHER
    ENVIRONMENT

    View Slide

  30. Questions?

    View Slide