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

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 .
主站蜘蛛池模板: 巴青县| 彭山县| 普陀区| 体育| 永新县| 靖安县| 稻城县| 昆山市| 宁波市| 自贡市| 盐源县| 通海县| 和田市| 锦州市| 嘉善县| 宝坻区| 府谷县| 建湖县| 禄丰县| 邢台县| 临泽县| 常熟市| 汝城县| 游戏| 锡林浩特市| 九台市| 二手房| 炎陵县| 丰城市| 新晃| 阿坝县| 淄博市| 泾阳县| 县级市| 碌曲县| 璧山县| 突泉县| 临清市| 东乡| 雷波县| 福海县|