{"id":1873,"date":"2020-10-16T12:00:00","date_gmt":"2020-10-16T10:00:00","guid":{"rendered":"https:\/\/blog.besharp.it\/?p=1873"},"modified":"2021-03-18T16:24:15","modified_gmt":"2021-03-18T15:24:15","slug":"ecs-deployment-strategies-reduce-downtime-and-risk-with-blue-green-deployment","status":"publish","type":"post","link":"https:\/\/blog.besharp.it\/ecs-deployment-strategies-reduce-downtime-and-risk-with-blue-green-deployment\/","title":{"rendered":"ECS deployment strategies: reduce downtime and risk with blue\/green deployment."},"content":{"rendered":"\n
Microservices architecture has now become a leading pattern in many software projects. Thanks to its enormous advantages in terms of development and deployment speed, it eases the daily tasks of DevOps teams.<\/span><\/p>\n\n\n\n
To leverage this architectural pattern on AWS we can use Amazon Elastic Container Service (Amazon ECS), a fully managed container orchestration service.<\/span><\/p>\n\n\n\n
ECS is a great choice for container execution for several reasons. First, it allows you to run ECS clusters using AWS Fargate, a serverless infrastructure for containers. Fargate removes the need to provision and manage servers, allowing us to pay only for the resources used for each application.\n<\/p>\n\n\n\n
Additionally, ECS can be natively integrated with other services such as Amazon Route 53, Secrets Manager, AWS Identity and Access Management (IAM), and Amazon CloudWatch.<\/p>\n\n\n\n
Managing microservices architectures on ECS is not always an easy matter. On our blog we have already discussed how to create and manage clusters and implement CI \/ CD pipelines for ECS.\n<\/p>\n\n\n\n
In this article we are going to see a fundamental aspect for the continuous integration of the software, which is the different strategies of releasing new software packages. In particular, we will focus on the blue\/green methodology, a relatively new technique that solves many problems of other simpler deployment modes.<\/span><\/p>\n\n\n\n
Deployment strategies <\/h2>\n\n\n\n
To date, there are many deployment strategies. Let’s see together the most popular and supported by ECS:\n<\/p>\n\n\n\n
Rolling update<\/b>: In this mode, the old and the new software version will coexist in the release phase. In fact, the new package will be installed progressively on all servers. What does it involve? Your application must be able to support both versions, which can become complicated when these two use a different version of the database. This deployment mode is among the simplest to set up, however it is important to consider that there are strong constraints on the backward compatibility of the released versions.<\/span><\/li><\/ul>\n\n\n\n