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 個回答
2
已接受的答案

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
已回答 1 年前
profile picture
專家
已審閱 1 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南