Canary deployment

Canary deployment is a technique that's used to gradually increase the load for the new version of the application.

Danilo Sato described this technique at the beginning of 2014, which was reported on Martin Fowler's site at https://martinfowler.com/bliki/CanaryRelease.html. The following is a quote that's been that's been taken from this site:

"A benefit of using canary releases is the ability to do capacity testing of the new version in a production environment with a safe rollback strategy if issues are found. By slowly ramping up the load, you can monitor and capture metrics about how the new version impacts the production environment. This is an alternative approach to creating an entirely separate capacity testing environment, because the environment will be as production-like as it can be."

Here is a logical architecture of the canary deployment:

The key point here is to slowly increase the load for the application and monitor its behavior. This process may take a few hours or a few days; it depends on how fast you want to go, and the time your users need to adapt to these new changes.

From OpenShift's perspective, what has been done in the blue-green deployment example is still valid. So, in case you didn't follow the Blue-green deployment section, please do so, and then continue with these new instructions:

  1. In My Project, in the left-hand sidebar, click on Applications | Route and select the route named blue-green-app.
  2. In the top-right corner of the page, click on the drill-down menu named Actions and select Edit.

Scroll down to the bottom of the page and enable the check box that states Split traffic across multiple services in the Alternate Services section, as follows:

  1. Set Service to blue-green-app, set the Service Weights so that 10% of the load goes to blue-green-app-2 and that the 90% of the load goes to blue-green-app, and click the Save button at the bottom of the page.

The route page should now evidence how traffic is split graphically, as follows:

  1. Try to reload our page 10 times. If you see the page with green text once, you successfully performed a canary deployment.

Once the audit and monitor tools fulfill your organization needs, you can gradually increase the load until a full rollout is reached, which means that only the green version is online.

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

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