diff --git a/infra/fargate/nginx.tf b/infra/fargate/nginx.tf index ef6a6cb..5be11ea 100644 --- a/infra/fargate/nginx.tf +++ b/infra/fargate/nginx.tf @@ -43,6 +43,10 @@ resource "aws_ecs_service" "beta_reverse_proxy" { task_definition = aws_ecs_task_definition.beta.arn desired_count = 1 launch_type = "FARGATE" + # Allowing doubling over when we request a new container for quick refreshes + # to the ecs service allowing for super fast and 0 down time deployments + deployment_maximum_percent = 200 + deployment_minimum_healthy_percent = 100 load_balancer { target_group_arn = var.lb_target_group container_name = local.nginx_name diff --git a/infra/fargate/readme.md b/infra/fargate/readme.md index 6e36e06..44ab086 100644 --- a/infra/fargate/readme.md +++ b/infra/fargate/readme.md @@ -1,5 +1,14 @@ # Fargate configuration +## Blue/Green Deployments + +Services such as `nginx/beta` ( which serves static content ) are deployed & +updated using a blue green deployment method which is facilitated by allowing +overflow containers to spawn and replace older containers. This is most common +for `nginx` because we often want to update content stored in S3 however +the container itself will not refresh for sometime so we can force a refresh +and get content out much faster this way. + ## Alpha Cluster ### nginx/beta