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년 전

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

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

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

관련 콘텐츠