- Newest
- Most votes
- Most comments
Yes so AWS Fargate is a serverless compute option in that you only worry about running your Task (container) so the billing is based on number of task plus vCPU and Memory per second used. This is because AWS is taking on the undifferentiated heavy lifting of managing the provision, configuration or scale of the nodes your task run on, as well no longer need to optimize your cluster, so thus cost associated with it. As well the security benefits of running on Fargate (isolation boundaries).
Also with ECS you have the scheduler which allows you to run tasks as always on or schedule them or kick them off through your own processes or operator [1], if they dont need to run all the time and save money. The best way to look at pricing is to the use the calculator to get a good idea of cost [2].
AWS Fargate is serverless but you need to determine if the cost of operating your own is worth the money saved for your compute.
[1]https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html [2]https://calculator.aws/#/addService/Fargate
Relevant content
- asked 5 months ago
- Accepted Answerasked a month ago
- asked a year ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
Hi Aaron, Seems like I am completely on wrong path by choosing Fargate. Because my microservices are not small task that I can stop sometimes and run sometimes, it is logistic and commerce app that has multiple functionality in it, it has membership, shipment, delivery, payment and reporting features. Instead if keeping all features in one monolithic app, I divided them in separate MS.
So there is no time that these MS will stop or they can run as small tasks sometimes. I was trying to choose between Kubernates and Fargate, none of docs told me that Fargate is only for a tasks that can run sometime. In my case I am trying to run many apps that must be up all the time. Now I am thinking the cost is going to be too high. What will be other better deployment option? Thank you
Hi Ozy, With any design there are trade offs, Fargate can still work for a complete MS application but it will cost more because you are allowing AWS to do the heavy lifting for you (isolation, manage the cluster(scaling), manage the OS etc) so if those are things you dont want to do Fargate would be a good choice but with higher cost. If you prefer to roll it your own and try to save operational cost then you could simply run your MS on EC2 instance with ECS, you till take on some of the operational up keep but it still easier to manage then EKS(unless you have alot of experience or need more advanced features). Also you could do a mix here, for a service in your cluster you want that more secure boundary or some of the heavy operational lift removed from you, you could run on Fargate and then the rest on EC2.
As well I would like to point out since these sounds like steady workloads (for most part) you can use Saving Plans to agree to a certain term of spend on your Compute and AWS will give you a discount, this can be used with either EC2 or Fargate instances.