i will suggest you check your AWS CloudWatch Alarms because auto-scaling behavior is often triggered by CloudWatch alarms. If there are any alarms set up based on CPU usage, they might be scaling your service. Also you could refer to this AWS documentation https://docs.aws.amazon.com/AmazonECS/latest/developerguide/troubleshoot-service-auto-scaling.html to better troubleshoot your issue
Hope it clarifies and if it does I would appreciate answer to be accepted so that community can benefit for clarity, thanks ;)
Sometimes, Fargate tasks need to be replaced spontaneously. This can happen due to several causes:
- An underlying hardware degradation has occurred, and so the task must be migrated to a replacement instance
- To ensure customers are secure, we must periodically apply patches to the underlying hardware, OS, and/or container runtime. Sometimes these require tasks to be migrated to a replacement instance or restarted.
Fargate will make every effort to respect your service's deployment rules, so one thing you can do is to set your deployment configuration's maximumPercent to 100, and set its minimumHealthyPercent to 0. However, this is not a completely safe solution, as there are still situations in which more than one task could be running. For so-called singleton services such as yours, we strongly advise customers to employ a distributed lock (basically, a mutex shared across different tasks) so that only one task is able to process work simultaneously. An inexpensive distributed lock pattern that uses DynamoDB can be found here. Redis, via AWS ElastiCache, can also be used to implement a distributed lock.
- Accepted Answerasked 2 years ago
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated 3 months ago
- How do I set up the AWS Load Balancer Controller on an Amazon EKS cluster for Fargate and then deploy the 2048 game?AWS OFFICIALUpdated 20 days ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 8 days ago
- EXPERTpublished a year ago