Even the best software development teams I work with struggle to solve the problem of _completely automated deployment_s to their production environments. The biggest hurdles to this tend to take the form of:

  • Production change management that requires manual approval
  • Even microservices architectures that have dependencies on multiple services being bundled and deployed together
  • Unable to separate the idea of a version and deployment

There are several strategies we can apply to solve those points individually, but one simple trick to solving all these issues with one pattern is to apply Feature Flags to your code.


Ultimate Shift-Left Development Practices

Image for post

Source

It does not matter if you are developing on an older monolithic application or a greenfield microservices architecture application; you can introduce feature flagging into either pattern. In addition, with the industry standard of agile development, it can be near impossible to code an entire net new feature in a single sprint. Using feature flags, we can simply default our new code to “off" and regardless of who asks for what during our sprint, we can package our app and deploy it without worrying about something breaking.


Test in Production!

Image for post

Yes, you’ve read that right. I am advocating you use feature flags to test in prod! Alright, well, hold on — before you start getting crazy thoughts and think I’ve lost my mind, let me clarify.

There are a few areas where we can use feature flags and turn things on in production without causing a major impact to our end-users:

  • Background load testing: Let’s say we have a new feature that we know is going to be pretty chatty. Maybe it’s the ability to send real-time messages to other users or real-time collaboration on a document. Instead of trying to simulate user load and action in a QA/performance environment before flipping the switch in production and releasing our shiny new feature, we can actually use real users to simulate the traffic load. This is actually a famous tactic Facebook used before rolling out messaging to its user base. For months, bits of JavaScript were sending messages to your other friends, and unless you had a packet sniffer open, you’d never know!

#software-development #feature-flags #javascript #startup #programming

Feature Flags for True Continuous Deployment
1.70 GEEK