6 ms·
Using a container orchestration system gives you far more resilience than just running a docker image on an EC2 instance. When you run a docker image on an EC2
by NathanKP 9y ago
Using a container orchestration system gives you far more resilience than just running a docker image on an EC2 instance.
When you run a docker image on an EC2 instance if that docker image crashes what will restart it? What if the EC2 instance itself fails?
With ECS you give the container orchestrator an intent:
"Run X copies of this container at all times, associated with this load balancer"
Then you give the container orchestrator a place to launch stuff: either a cluster of EC2 instances, or AWS Fargate.
Then the orchestrator continuously validates the state of your deployment and relaunches or moves containers as needed to serve your intent. You can even run spot instances to get up to 80% savings on your AWS bill, and if you get outbid on the spot market the container orchestration layer will move your containers to another machine.
That in a nutshell is the benefit: the orchestrator lives outside of your instance and prevents the instance from being a failure point in your system, by separating your intent to run an application from the underlying resources that actually run it.