153 points · by aray07 · 7y ago · 91 comments
I actually really like ECS and aware of how much time it would save me (a lot) and how much terraform I could delete (a ton) and it’s still not even close to worth it.
Amazon usually nails this sort of thing, surprising that despite the operational value it provides nobody seems to be using it.
Still, I'm with you. I use Fargate for my open source project but I fully expect teams using it to eventually move to EC2 and manage the cluster directly in order to save money. It is easily, by far, the most expensive part of my pipeline.
The problem with AWS (or any cloud provider) is that nobody can create its own cloud services. See the case of Mongo DB.
AWS is a closed source platform, which can be extended only by Amazon.
This will be more evident once more operators will be created for kuberentes.
I also fail to see how Fargate locks you in: as you say, it's just docker and DNS, with a sprinkle of environment variables if you use it with SSM Parameter Store.
Keep in mind, this doesn't make it bad or impossible to move out. Just more work. That all being said, I still like Fargate even with it tying me to using AWS. I think the pros out-weight the cons.
That’s just like all of the software developers using the repository pattern just in case their CTO decides to move from their six figure Oracle installation to Postgres.
The cost of moving away from your chosen vendor is usually not worth the cost, doesn’t have the ROI, and not worth the business risks of regressions.
First thanks for the feedback. We are listening closely and feedback (critical or otherwise) really helps us focus on what to build.
We think of Fargate as simplicity, without compromising on capability. We don’t want price to be a barrier for customers to realize simpler operations models. We are thinking through additional pricing options for customers. We use open source where it matters for our customers and partners. For instance, we recently launched a new capability called FireLens (in preview) that uses Fluentd and Fluent Bit to help partners use a standard codebase and to help developers realize cost savings on logs.
WRT lock in comments on this thread, I was a startup product manager in my past life. What really mattered to us was speed of execution and keeping our costs in control. Choose a product that helps you realize those goals (if they resonate with you), whether it is Kubernetes or ECS/Fargate.
From a cloud provider PoV, Fargate is a very hard problem - like Lambda except harder because the container might need to run forever.
Note: do have some stuff in lambda but its package size restrictions limit us.
Each Fargate task has its own isolation boundary and does not share the underlying kernel, CPU resources, memory resources, or elastic network interface with another task. (Source: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/...)
The other part is patching. We are (I work at AWS) responsible for patching the underlying hosts. More details at https://docs.aws.amazon.com/AmazonECS/latest/developerguide/...
Isn't Lambda the same as they're both using Firecracker under the hood isn't it?
On EC2 I can deploy monitoring tools like OSQuery, or rely on audit/ other OS subsystems to monitor for suspicious behavior. On Fargate I don't think anything like this is possible.
OSQuery as a sidecar might work, if you stuff it in the container, but I doubt it can access the audit subsystem and I'm unsure if it's really been tested in that sort of environment.
I'm not concerned about container escapes or the underlying host being owned.
You're free to run a CIS hardened image if you desire to do so.
I hope Google Cloud or AWS is working on that. That would have a much wider impact then Fargate.
Make it have a default deny all NetworkPolicy and you are all set.
I'd love to see this too.
Early on, Amazon tried to avoid offering a managed Kubernetes service, and so they rolled their own container service in the form of ECS. Later they caved in and created EKS, their Kubernetes platform. ECS is still used as the underpinnings of some of their other services, such as Batch and Fargate.
As far as I recall, this is all configured on the load balancer, rather than directly inside Fargate. Somehow makes it feel less like a "fully managed" solution, but rather something you have to still tinker quite a bit with.
(compared to Lambda, which you really don't have to worry about scaling at all)
EDIT: [0] indicates that the minimum you can set is 10 seconds (minimum 2 intervals of 5 seconds to consider it "healthy"), if I understand it correctly
[0] https://docs.aws.amazon.com/elasticloadbalancing/latest/appl...
Kubernetes is a container orchestrator. If you have a k8s cluster, you can launch a container with a specified amount of memory (and I believe CPUs) and it will look much like Fargate. However, someone needs to manage the underlying hardware/VMs for the cluster as well as the cluster software/updates (k8s version, various k8s addons/operators, etc). With k8s, you will also need to make sure that you are using resources effectively (total resources required by containers == total resource available on the VMs in the k8s cluster), which is particularly challenging if you are launching new containers often. If you are using a cloud k8s offering (EKS, AKS, GKE, etc) then some or all of the VM management will be handled by the cloud provider, but the software management and resource utilization work will still be up to you.
TLDR Fargate and k8s can be used very similarly, but k8s has a much higher ops/management burden. K8s was designed to do many more things than Fargate and, while that is sometimes great, it comes with a large ops/complexity cost.
Not really, in fact, they announced EKS (their Kubernetes service) on Fargate at the same time they announced EKS, even though they've since seemed to have abandoned it; conceptually they live at slightly different levels of the stack.
https://github.com/aws/containers-roadmap/issues/187 sounds like the answer is "no"?
If your problem is reproducible at will in prod (big if), theoretically you can bake each thing you try into your container build and debug its automation at each step, often slowing the debugging process down prohibitively.
codepipeline integration was time consuming to set up. You have to get it to create a json file with the image id and uh I'd have to consult my notes.
All told, it was more complicated to set up than I expected.
The approach I’m going with is to have an EC2 host attached to the ECS cluster which people can schedule interactive tasks on. Coupled with some scripting (maybe a Lambda function if I decide to get fancy) we can then start a task for any given service on the instance with the same environment and IAM role, but with a command like /bin/yes just to keep it alive. Once that’s running users can SSH to the host instance and docker exec into the container for whatever command they actually wanted to run.
It’s quite a bit more involved than Heroku’s run command, but initial prototypes seem to indicate it’ll work once we wrap it in some tooling.
And it quoted me $400/month.