4 ms·
If you're looking for a middle ground between VMs and serverless, ECS Fargate is a good option. Because a container is always running, you won't experience any
by randomtoast 1y ago
If you're looking for a middle ground between VMs and serverless, ECS Fargate is a good option. Because a container is always running, you won't experience any cold start times.
- sgarland 1y agoYes, though unless you’re provisioning your own EC2s for them to run on, you have no guarantee about the server generation, and IME AWS tends to provision older stuff for Fargate. This may or may not matter to you depending on your application’s needs, but there is a significant performance difference between, say, an m4 family (Haswell / Broadwell) and an m7i family (Sapphire Rapids) - literally a decade of hardware improvements. Memory performance in particular can be a huge hit for latency-sensitive applications.
- raw_anon_1111 1y agohttps://aws.amazon.com/blogs/aws/announcing-amazon-ecs-managed-instances-for-containerized-applications/ https://aws.amazon.com/blogs/aws/announcing-amazon-ecs-manag...
- evantbyrne 1y agoECS is good, just expensive and still requires more devops than it should. Docker Swarm is an easy way to run production container services on VMs. I built a free golang tool called Rove that provisions fresh Ubuntu VMs in one command and diffs updates. It's also easy-enough to use Swarm directly.
- TheTaytay 1y agoSounds useful! I hear mixed things about Swarm. You like it? Edit: found it. Cool! https://rove.dev/ https://rove.dev/
- evantbyrne 1y agoYeah I haven't had any issues with Swarm. Heard good things from people running substantial clusters. Would be interested in hearing about what rough edges people have run into as well!
- torginus 1y agoHonestly I didn't have a good experience with ECS (Fargate) - I remember I had to write a ton of CF deployment scripts+bash scripts, setting up a private AWS docker registry, having a terrible time debugging while my CF deployment always failed, deploys taking forever, finding out that AWS is too miserly to pay Docker to use the official repo so they are stuck on the free tier, meaning sometimes deploys would fail due to Dockerhub kicking the AWS docker agent out etc. It had limitations like not being able to attach a block volume to the docker instance, so overall I remember spending a week setting up the IaC for a simple-ass CRUD app on Fargate ECS. Setting up the required roles and permissions was also a nightmare. The deployment round trip time was also awful. The 2 good experiences I had with AWS was when we had a super smart devops guy who set up the whole docker pipeline on top of actual instances, so we could deploy our docker compose straight to a server in under 1 minute (this wasn't a scaled app), and had everything working. Lambda is also pretty cool, you can just zip everything up and do a deploy from aws cli without much scripting and pretty straightforward IaC.
- evantbyrne 1y agoA lot of AWS requires way too much config. It is a mystery to me why AWS doesn't lean into extending the capabilities of App Runner. I actually built a whole continuous deployment PaaS for AWS ECS with a Heroku-like UX, ended up shutting it down eventually because although useful, their pricing is pretty awful. What I need to do is figure out how to bring it back, just minus the hosted service so I can use it on corporate projects that require AWS...
- raw_anon_1111 1y agoI posted a link to a CloudFormation template I’ve used to deploy to ECS off an on for 8 years in a sibling reply. It’s stupid simple. But the easy solution is just to use AWS’s own Docker registry and copy the images to it. Fargate has allowed you to attach EFS volumes for years.
- raw_anon_1111 1y agoI’ve used a modified version of this for 8 years - I didn’t write it. Updating your ECS Docker image is just passing in the parameter of your new image and updating the cloudformation stack. https://github.com/1Strategy/fargate-cloudformation-example/blob/master/fargate.yaml https://github.com/1Strategy/fargate-cloudformation-example/...
- evantbyrne 1y agoThanks for sharing! I'll bookmark that.