Canary deployment

When company emphasis on using of continuous delivery, then a company needs to decide which deployment strategy to use. There are many deployment strategies are exists like “Big bang”, “Rolling deployment”, “Blue Green” and “Canary deployment”.

In canary deployment, particular feature will be released to small subset of users only. A feature won’t be roll out for all the users. If we don’t find any defects or bug while these users testing the feature, then that feature will be deployed to the remaining production infrastructure also. If any problem found with the newly deployed application, then small number of users will be affected. In that case, we can rollback to the older version.

Canary deployment serves as early warning indicator. If the deployment fails, remaining set of users are not impacted.

The phrase “canary in a coal mine” is frequently used to refer to a person or thing which serves as an early warning of a coming crisis. By analogy, the term “climate canary” is used to refer to a species (called an indicator species) that is affected by an environmental danger prior to other species, thus serving as an early warning system for the other species with regard to the danger.

Wikipedia
PC: dev.to

Challenges

Front-end changes: We may have back-end services changes. This changes could be refactoring of code or performance improvement. In the case of back-end changes, user won’t see any much differences.

However, if there are changes related to front-end then users might get confused because users will be routed to old or new infrastructure randomly. so sometime they may see older version of UI changes and sometime they may see newer version of changes.

Database changes: If we have made any changes in database then older infrastructure’s users might get exceptions or unexpected behavior of application. Database changes may involve addition or removal of column or any other DDL changes in the case of RDBMS. In that case, newer infrastructure (back-end services) may have changes which are inline with database changes. However, older infrastructure’s users may see exceptions.

Routing strategy

We can choose which set of users we want to route to the new infrastructure. It may be based on region also. Like only particular country’s or city’s users will be routed to new infrastructure.

Routing can also be done based on IP ranges.

Leave a Reply

Your email address will not be published. Required fields are marked *