官术网_书友最值得收藏!

Canary deployment

Canary deployment is a deployment technique involving a gradual shift in production traffic from version A to version B, where version B is the latest version and version A is the previous version. AWS has recently introduced traffic shifting for Lambda functions aliases. An alias is a pointer to a specific version of the Lambda functions, which basically means that we can split the traffic of the functions between two different versions by specifying the percentage of incoming traffic that we want to direct to the new release. Lambda will automatically load balance requests between versions when aliases are invoked. So instead of replacing one function with another version, both versions can coexist and can be monitored as to how they perform. 

All of this sounds awesome, but doing all this it not that easy. Fortunately, AWS already has a service that will help us with this problem—CodeDeploy. To use canary deployment with the AWS CodeDeploy service, we need to create a variety of resources. We need to create a CodeDeploy application, a deployment group, and aliases for the functions. We also need to create new permissions and replace all the event sources to trigger the aliases instead of the latest functions. But this can be much easier if we use the canary deployment plugin with Serverless Framework. Let's learn how we can achieve this using an example.

The code that we will be working on in the following recipe is available at  :https://github.com/shzshi/my-canary-deployment.git .
主站蜘蛛池模板: 浠水县| 江城| 满洲里市| 滕州市| 佛坪县| 渝北区| 南丰县| 湟源县| 辽阳县| 苍山县| 吴川市| 晴隆县| 蓬溪县| 昌宁县| 乌鲁木齐县| 梅州市| 夹江县| 德化县| 乐昌市| 通渭县| 吴忠市| 大安市| 永泰县| 桓台县| 黑水县| 敦煌市| 日喀则市| 保山市| 屯昌县| 贺州市| 长泰县| 陆川县| 清河县| 张掖市| 云梦县| 敖汉旗| 抚州市| 岳池县| 西安市| 二连浩特市| 芜湖市|