In that case, you don’t need an application load balancer. You would need it only if you use EC2 as your ECS data plane because you would have to place containers for your flows on various EC2 instances depending on metrics like CPU load of each instance. With Fargate, all compute for your Prefect flows gets provisioned on demand, so there is nothing to balance over, if that makes sense 🙂There is an updated guide on how to set up an ECS service for the Prefect agent: https://towardsdatascience.com/how-to-cut-your-aws-ecs-costs-with-fargate-spot-and-prefect-1a1ba5d2e2df
Can I not load balance the ECSAgent Fargate service itself to ensure at least one instance is running?
That way I can define a security group for the long running instance, too?
Anna Geller (old account)
11 months ago
@Andreas Tsangarides Prefect agent is a lightweight process, so one container is enough, and running your container as ECS service will ensure that even if the agent container dies for some reason, ECS service will restart it.