EC2 vs Fargate in ECS/EKS cluster

0

I want to know what is the major difference between EC2 and Fargate. Why fargate is more expensive it is charge based on minutes. Which one is better to consider for running application

1 Answer
2
Accepted Answer

Fargate is a managed compute layer by AWS: They manage the underlying host to run the containers into for you. EC2 instances are managed and deployed by yourself, so it is up to you to deal with maintaining these. They both have pros and cons, and I personally much prefer to use Fargate as it is a lot less overhead management, "I just want to have containers running".

We have 1000s of containers running on top of Fargate and not having to manage any EC2 hosts is worth the additional costs. Also not having access to the underlying host is, to me, a great bonus security-wise as people don't connect and hack their way into doing things on the hosts they are not supposed to be doing. It's also a lot less worry to patch, update the OS, etc.

With ECS you can create capacity providers, which is ECS driving an AutoScaling group so that you don't have to do this. It will provision EC2 instances for you based on the number of services that need to be running.

Hope that helps,

profile picture
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions