How to speed up provisioning of ECS Fargate task

0

We are currently experiencing slow provisioning times (30-40 seconds) for an ECS task triggered by an endpoint.

This Fargate task performs complex database and S3 operations and is expected to handle a high volume of requests. We are seeking solutions to significantly reduce provisioning time while maintaining the use of Fargate.

Please assist with is blockage.

2개 답변
0

This document explains couple of ways to improve the speed : https://docs.aws.amazon.com/AmazonECS/latest/bestpracticesguide/task.html

profile picture
답변함 5달 전
0

It is normal for new AWS Fargate tasks to take 30-45 seconds or longer to start. That's because each Fargate task runs in its own isolated compute instance that is launched on demand to fit your task's declared size, and there are multiple steps that must take place to launch your task. These steps include launching the compute instance, allocating and attaching a network interface, downloading your task image from the registry, unpacking the image layers, starting the program, and possibly attaching it to a configured Load Balancer.

When using Fargate to process asynchronous jobs, the recommended architecture to minimize latency is to have a pool of work consumers (with a minimum pool size of 1) that consume from a work queue (such as an Amazon SQS queue), and that scales in and out smoothly according to demand. In such architectures, using queue depth as a target metric for scaling is a good choice.

If this design does not suit your needs, and each job or unit of work will take less than 15 minutes to process, and you need only 10 GiB or less of ephemeral storage, consider using AWS Lambda to perform your database and Amazon S3 operations instead.

AWS
전문가
답변함 5달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠