aws

2024-09-07T16:12:09.022349Z

Another decision is ecs vs raw ec2+asg. I am deploying a biff web app and I don't see much advantage in ecs, since I only have 1 type of task (a web app) and I only want one large app per ec2 instance. Simpler to skip ecs. And I don't trust fargate to stay highly available and respond quickly to web requests if they are not coming frequently at first. But ecs doesn't seem all that complicated and maybe I will want to run more tasks in the future. Leaning away from ecs but would love your thoughts.

2024-09-08T11:31:10.552829Z

Wow. I had no idea fargate would not scale to 0. I thought a major selling point was to only charge you for what you use, from which I concluded it would scale to 0.

Max 2024-09-08T14:29:34.667669Z

I mean it will, but you have to manually scale it or configure a scaling policy to get it to Steve requests again. Fargate’s seeing point is that you can use the ecs container orchestrator and not have to worry about the infra those containers run on.

☝️ 1
viesti 2024-09-08T15:09:16.691599Z

Fargate can also be used with Kubernetes, but I have managed to avoid Kubernetes things thusfar 😄 So yeah, the selling point in Fargate is providing hosted runtime for containers, so you don’t have to manage the EC2s and host operating system maintenance yourself

viesti 2024-09-07T16:22:46.051149Z

ECS/Fargate has been my defacto, with seldom used apps have seen that ALB does scale down it's own backends, and sometimes is slow to repond, not so much Fargate. But, I think you have to take the journey yourself, and see what feels good for you :) For me, I haven't used nrepl to backends that much, has been enough to poke around with socket repl ecs exec, when needed

🤔 1
2024-09-07T16:40:09.703499Z

Now that I think more, I really like that ecs will gradually deploy new versions of my tasks when I update the docker image.

Max 2024-09-07T18:37:00.703329Z

wrt fargate availability: fargate does not have cold starts because it does not scale to 0. It will not scale in response to incoming requests, you have to set up all the scaling yourself. I usually recommend fargate to ppl over ecs on ec2 because it’s just a question of whether you want to manage the underlying compute or let aws do it. Doing it yourself can be cheaper on your aws bill in theory but then you have to solve all the bin packing problems that they solved for you with fargate

Max 2024-09-07T18:38:33.606749Z

For your simple use case, it may be worthwhile to take a look at aws app runner. It’s more restrictive than ecs but is still serverless and works with docker containers, which is a pro over ec2. It can scale to almost 0 if you want it to but you can tell it not to and its cold starts are faster than lambda’s

Max 2024-09-07T18:38:59.984229Z

Also much lower setup complexity than ecs