Blue/green deployments

The blue/green deployment strategy is an interesting strategy. This strategy implements a mix of techniques there are used for testing the application and launching it in production.

Inside the blue/green approach to deployments, the updated application is introduced inside the infrastructure with the equivalent number of instances as that of the older version of the application. Once this is done, the new version of the application is tested inside the infrastructure. Once the version is found to be stable, the traffic is then switched from the older version to the newer version of the application and the older version of the application is decommissioned. The following diagram shows a representation of the Blue/Green deployments strategy:

This kind of deployment strategy is highly effective in both monolithic applications as well as the applications based on microservices architecture.

This kind of deployment provides a certain set of benefits that are not present inside the recreate deployments and rolling deployments:

  • Quick state changes: Since the application introduces the new application version as a whole, the traffic inside the production infrastructure is switched from the old version to the new version in one go without any kind of downtime taking place.
  • Instant rollback: In case the newly introduced application shows some anomaly in the behavior, the requests can be immediately switched back to the older version without any hassle, essentially rolling back the upgraded application. An interesting question that may come up with such a deployment regarding the rollback of the databases if the two versions have incompatible database schemas. In this case, a small rollback helper program might be required to successfully move the data between the incompatible schemas.

The only cons with this kind of approach is that now we need to maintain a bigger infrastructure that can handle two copies of the application, where one is old and the other one is new, and provide an easy way of switching between those instances.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.79.84