AWS - Fargate vs EC2

Hello Everyone, I wonder why all the documentation of AWS ECS refers to Fargate type but not EC2 type. Fargate is expensive.

Presumably because AWS wants to push everyone to use fargate (not manage their own EC2 instances) because that makes them more money and it also helps keep the docs focused on containers and not having to reference/discuss the underlying instances that power them.

Yeah, Thanks for your thoughts. I also believe that.

I am looking for documentation on ECS with EC2 for Spring Boot microservices deployment. Though, we did make that work, but in the absence of proper documentation, not sure if that is the correct way to do it. Still testing all the possibilities.

Got to love the ridiculous number of services there are to launch containers these days: EC2 ECS, Fargate, EKS, Lightsail containers, Elasticbeanstalk etc.

Fargate is better and simpler for everyone. the TCO of EC2 is really high. It makes sense to push Fargate

Can you please give example case study for this. What I calculated for my loads, fargate is pretty expensive. Esp. if the underlying containers are memory intensive.

Do you understand what TCO is?

Fargate surely is simple, but when we look at the workload type and underlying resources, not every case is economical in favor of fargate.

How much did you factor in for instance patching, monitoring, and general maintenance?

And debugging/investigation/hiring/recruiting for EC2 management

For me as with most container deployments, it boils down to how much slack you have in your setup. If you can pack as many containers into EC2 instances as possible leaving almost no spare CPU/Memory per host then EC2 is going to be significantly cheaper. But this is hard to get right.

I believe all the Fargate pricing assumes also that your containers are relatively short living processes and not for example web applications which need to be up 24x7 (a lot of their pricing is container A spins up for 10 minutes).

If you’re able to throw in spot with your EC2 then you have quite a cost effective solution.

When comparing TCO of EC2 vs Fargate you have to add in the personnel cost. As mentioned, did you factor in YOUR cost to manage an EC2 container cluster? Most admins or ops people forget to include their cost because they don’t want to price themselves out of a job, but an admin/ops person is the most expensive piece of the puzzle.

AWS pushes people to Fargate because AWS pushes to businesses. The don’t push to admin/ops people. And in business it’s all about reducing cost.

If an engineer costs $100k per year (low by US standards) and they spend 20% of their time maintaining instances, that is $20k per year that should be added to the cost of that platform.

But, everyone treats their time as free, so it never factors in

This is not even an engineer-doesnt-know-their-value exclusive issue. Management/department heads sometimes consider engineers time “free” because “we’re already paying them anyway”. Ofcourse this is patently ridiculous when viewed from the entire business perspective, but it can be rational from the managers point of view if headcount is easier to justify than the added expense (usually these are very different business processes).

I am loving this discussion and participation by multiple experts.