Does anyone know how to speed up fargate deploys with pulumi?
I am deploying ecs services with fargate. the first deploy takes about 2 minutes - but subsequent deploys that replace the service take about 10 minutes. does anyone have insight into how to speed this up again? it's definitely not the build, but something to do with the deploy
11/16/2022, 5:13 PM
this could a wide variety of things unfortunately, such as healthchecks and such like. any insight into where the bottle neck is?
11/16/2022, 5:41 PM
so i can tell you my basic configuration is a fargate deploy with an application load balancer, configured with the default settings according to the pulumi awsx package
Also have a container healthcheck on the fargate deploy
But all of it is default - on the health check front, nothing other than that. and i am certain its not build time
build time is sub 1 min
11/16/2022, 5:46 PM
all Pulumi does is send API requests and then poll the API for a response. If the replacement is taking 10 minutes, that’s because it’s taking 10 minutes in AWS
11/16/2022, 5:48 PM
gotcha. good to know. seems like its an aws problem then
11/16/2022, 6:33 PM
You may want to check the ALB defaults and adjust these, also check the deployment type settings, which you may want to adjust depending on what the desired count is for the service. I believe the minimum healthy percent is 50% and maximum 200%, by default.
For ALB check the health check settings, but perhaps in particular the deregistration delay, which is 300 seconds by default. Also, do you have any delay in the task definition for start and stop delays of the containers?
Some of these settings are probably more suited to various software running on regular EC2:s than containers, so it might be worthwhile to tweak them.