DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Why Pass/Fail CI Pipelines Are Insufficient for Enterprise Release Decisions
  • Goodbye Mono: Why Unity is Switching to CoreCLR
  • Applying Oracle 19c Release Update (RU): A Practical Guide from My DBA Experience
  • Designing Irreversible Security Release at Hyper-Scale: Lessons Learned From Things You Can’t Undo

Trending

  • Introducing RAI Audit Kit: Evidence-Grade Responsible AI Audits in Python
  • Implementing Asynchronous Communication Between Microservices Using Kafka and Spring Boot
  • Pragmatica Aether: Let Java Be Java
  • Feature Flag Debt: Performance Impact in Enterprise Applications

Powering Blue-Green Deployments With Feature Flags

Using feature flags for granular release control and risk mitigation in Continuous Delivery.

By 
Justin Baker user avatar
Justin Baker
·
Jun. 21, 16 · Opinion
Likes (6)
Comment
Save
Tweet
Share
4.1K Views

Join the DZone community and get the full member experience.

Join For Free

Blue-green deployments have long been a proven technique to mitigate risk in software releases.  By adding feature flags, developers are ushering in a new era of blue-green deployments, one with unprecedented granular control over feature releases.  This article discusses how to effectively integrate feature flags into your blue-green deployment process.

At its core, a blue-green deployment is a release practice that maintains two production environments called blue and green, switching between whether the blue or green environment is live.  The primary benefit of this approach is to mitigate risk and control the timing of releases. The blue version might have the new version and green the old version.  If something goes wrong, you can switch back to the more stable environment.

Blue-Green Deployments with Feature Flags LaunchDarkly

The old way of blue-green deployments was more of an all-or-none approach.  Traffic was funneled in a binary fashion, all to blue or all to green.  It was also focused around timing: you could determine when you wanted to switch traffic and then switch back if something went wrong.

Blue-Green Deployments with Feature Flags | All or None LaunchDarkly

Blue-green deployments, therefore, are a macro level of risk mitigation.  You are not focusing on testing smaller features, like a new search bar, and it’s usually something controlled by your operations team, not development.

With this blue/green deployment methodology, we are placing the burden of risk mitigation on our system architecture to test different application versions.  Imagine if you just wanted to test a small search bar update, would you want to go through an entire versioning process of duplicating environments and routing traffic?  This method may be overly excessive for small changes, especially if you are practicing continuous delivery and releasing multiple times per week (or per day).

To get more refined release granularity, you can complement your blue/green deployment with feature flags.  These flags are conditionals (if/else statements) that compartmentalize code at the ‘feature level’, meaning you can control the display of particular features instead of relying on separate application versions.

Blue-Green Deployments with Feature Flags LaunchDarkly | Percentage rollouts and risk mitigation

Using feature flags, you could still manage your traffic with a load balancer with the added benefit of gradually rolling out new features to your users.  For example, you could switch from green to blue with the feature flag turned “off” in blue.  Then, once traffic was flowing to blue, you can turn on the feature flag and gradually release the feature to 1%, 5%, 20%… of your users until you were satisfied with the performance and feedback.  

Coupling feature flags with blue/green deployments could be best used with major application releases (like upgrading from version 1 to version 2 of a platform).  However, for less substantial feature changes or gradual testing, you could utilize feature flags to manage feature releases within a single production environment.  This will allow you to continuously release small features while still mitigating risk.  It also allows you to release faster because you can practice continuous delivery while substantially reducing risk in the release phase.

Release (computing)

Published at DZone with permission of Justin Baker. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Why Pass/Fail CI Pipelines Are Insufficient for Enterprise Release Decisions
  • Goodbye Mono: Why Unity is Switching to CoreCLR
  • Applying Oracle 19c Release Update (RU): A Practical Guide from My DBA Experience
  • Designing Irreversible Security Release at Hyper-Scale: Lessons Learned From Things You Can’t Undo

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook