asfendeveloper.blogg.se

Aws fargate startup time
Aws fargate startup time











Network Load Balancer Health Checks - From testing in staging, we noticed that reducing our network load balancer’s health-check intervals and thresholds helped reduce staging deploy time from ~9 to ~6 minutes.This further reduced service deploy time to 16-18 minutes. We opened support tickets with the ELB and Fargate teams to get those limits increased. Will try again later.”ĭue to Scribd’s high Fargate task volume, the number of start and stop requests we were making was too high for AWS’ default limits. “service production-web operations are being throttled.“service production-web operations are being throttled on elb.There were events with the following messages. ECS Throttling - During deployments, we investigated the “Events” tab of our main web ECS service.This reduced service refreshes to ~22 minutes. We looked at Datadog APM for the p99 of our longest running request and set the delay to 17s from the default of 300s. It did lead to a cleaner image but that wasn’t our initial goal.ĭeregistration Delay - This is a property on a load balancer’s target group that dictates how long a task stays in Draining state after it stops receiving requests. We reduced our compressed image size from ~900Mb to ~700Mb and it led to little to no improvement. However, unless you can drastically reduce your image size (think 1Gb to 100Mb), this will not lead to significant time reductions.

#Aws fargate startup time how to

Here are some changes we implemented -ĭocker Image Size Reduction - The first thing everyone thinks of when considering ECS Fargate speedups is how to reduce the image pull time since Fargate (unlike EC2) has no image caching. We use the default rolling deployment which stops and starts tasks to trigger a re-pulling of the freshly-uploaded ECR image.

  • Restarting and waiting on ~500 Fargate tasks via the AWS CLI (32-35 minutes)īy far, the slowest part of our deployment was waiting for ECS services to finish updating.
  • Executing a Fargate task to run any database migrations (3 minutes).
  • Deploying assets via Capistrano to our asset-hosting servers (2.5 minutes).
  • aws fargate startup time

    Our starting implementation involved a few steps:

    aws fargate startup time

    In this post, we’ll share how we improved our deployment speeds from ~40 minutes to less than 20 minutes. Scribd moved its monolith to AWS in April 2020 and as part of the migration, we had to design and implement a deployment pipeline for our new (and shiny) ECS Fargate infrastructure.











    Aws fargate startup time