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 Answer
0
Accepted Answer

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
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions