Week10 Spring2023 DevOps - PostMid
Week10 Spring2023 DevOps - PostMid
• Feature Flags allow you to change how our system works without making
significant changes to the code. Only a small configuration change is required.
• Feature Flags offer a solution to the need to push new code into the trunk and
deploy it, but it isn't functional yet.
• Suppose you are modifying the interest calculations. You can change the code so
that other users who don't have the Feature Flag set will use the original
interest calculation code. The members of your team who are working on the
new interest calculations can set to see the Feature Flag will have the new
interest calculation code.
• The other type of Feature Flag is a Release Flag. Now, imagine that after you
complete the work on the interest calculation code, you're nervous about
publishing a new code out to all users at once.
• You have a group of users who are better at dealing with new code and issues if
they arise, and these people are often called Canaries.
Feature Toggles
• You change the configuration so that the Canary users also have the Feature Flag set,
and they'll start to test the new code as well. If problems occur, you can quickly disable
the flag for them again.
• You could have half the users working with the original version of the code and the other
half working with the new code version.
• You can then directly compare the outcome and decide if the feature is worth keeping.
Feature Flags are sometimes called Feature Toggles instead.
• By exposing new features by just "flipping a switch" at runtime, we can deploy new
software without exposing any new or changed functionality to the end-user.
• The question is, what strategy do you want to use in releasing a feature to an end-user.
• Reveal the feature to a segment of users, so you can see how the new feature is received and
used.
• Reveal the feature to a randomly selected percentage of users.
• Reveal the feature to all users at the same time.
Feature Toggles
• The purpose of the canary was to identify the existence of toxic gasses. The canary
would die much sooner than the miner, giving them enough time to escape the
potentially lethal environment.
• A canary release is a way to identify potential problems without exposing all your end
users to the issue at once. The idea is that you tell a new feature only to a minimal
subset of users. By closely monitoring what happens when you enable the feature, you
can get relevant information from this set of users and either continue or rollback
(disable the feature).
• If the canary release shows potential performance or scalability problems, you can build
a fix for that and apply that in the canary environment.
• After the canary release has proven to be stable, you can move the canary release to the
actual production environment.
Canary releases
• Dark launching is in many ways like canary releases. However, the difference
here's that you're looking to assess users' responses to new features in your
frontend rather than testing the performance of the backend.
• The idea is that rather than launch a new feature for all users, you instead
release it to a small set of users. Usually, these users aren't aware they're being
used as test users for the new feature, and often you don't even highlight the
new feature to them, as such the term "Dark" launching.
• A Company builds and launches rockets to launch satellites. When they have a
new version of a sensor, they install it alongside the old one. All data is
measured and gathered both by the old and the new sensor. Afterward, they
compare the outcomes of both sensors. Only when the new one has the same or
improved results the old sensor is replaced.
A/B testing
• Also, statistical analysis is used to determine which variation works better for a
given conversion goal.
• A/B testing isn't part of continuous delivery or a pre-requisite for continuous
delivery. It's more the other way around.
• Common aims are to experiment with new features, often to see if they
improve conversion rates.
Deployment Rings
Deployment Rings