4 ms·
So what would be some real use cases?
by urza 9y ago
So what would be some real use cases?
- mk89 9y agoI mentioned one use case - which is very similar to a batch, I agree, therefore there is no real difference there with Fargate/Batch. However, you don't have to execute only batches with it, you can also run a temporary service within a specific VPC - with the biggest advantage that you don't have to resize/manage your cluster. For example, you could set a Cloudwatch alert that, reached a peak of 80% of CPU, spins up a bunch of instances for a specific image with Fargate and keeps it alive until the CPU goes down to 60% (there it can be stopped). This way you don't have to worry about optimizing your autoscaling in ECS, because sometimes peaks happen in a matter of few seconds and it could be the case that you have not enough EC2 instances running, because lots of containers are running and they are spinning up in parallel. With Fargate it's like having an unlimited amount of EC2 instances running in your cluster... (which you pay for but certainly less than if you really had such EC2 instances always running) Let's try to think about it from another point of view: you could also try to use Fargate to execute all your services, but then you would get the following features already implemented: - autoscaling - HA - maintenance/cluster management However: - you don't like how AWS does autoscaling, because you notice that many times the nodes are under stress, and you would like to use a different strategy, or maybe you have computed your own autoscaling algorithm which is great and lets you save a large amount of money with it - HA is trivial for you to implement, because you already have a lot of experience with it, lots of CloudFormation scripts, and well, so far it worked like a charm, so why would I want to switch now? the platform is really functioning well, no need to switch to another technology - maintenance is not a problem for you, because your ECS cluster is small and easy to manage Maybe in such cases, yes, you don't need Fargate after all. Keep your ECS cluster and don't worry about that.
- JohannesH 9y agoRight now, we have 2 services and 1 scheduled job running on an ECS cluster running on 2 m3.medium spot instances. However we are utilizing less than 10% of the resouces available so moving to Fargate would be cheaper and much more convenient for us. Unfortunately Fargate isn't available on the Ireland region yet.