Fargate minimum task set to one with load balancer

0

With AWS Fargate, can we have minimum task set to one with load balancer. If yes, will this able to provide HA(High Availability). ? Is this scenario behaves differently in ECS and EKS?

1 回答
0
已接受的回答

With respect to ECS, you can always configure minimum task as 1 and i hope you have configured a service to monitor the state of the task as mentioned here: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-service.html You can always integrate service to a load balancer and have your application running. Now if you ask me if this will provide HA, i would say no. The way it works is it tries to maintain the actual state is equal to desired state and the moment a task fails / gets terminated for some reason the service will monitor this and will create a new replica (maintaining the state). Now this will have a brief outage depending on the time taken for the task to enter running state. If you are thinking about HA, i would request you to start with a replica count greater than 1 and setup autoscaling policy based on Service's Average CPU, Memory and ALB request for high availability and better performance.

You will have similar experience with EKS as well where the service can be configured as Load balancer and can be run with 1 pod (equivalent to task in ECS). Best practice is to always make sure you run more than 1 replica and configure autoscaling using HPA /VPA for better performance. Refer to below link for EKS best practice :

https://learnk8s.io/production-best-practices#application-development

AWS
已回答 4 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则