Container Orchestration

Part 1, Chapter 5

What is Container Orchestration?

As you move from deploying containers on a single machine to deploying them across a number of machines, you'll need an orchestration tool to manage the arrangement and coordination of the containers across the entire system. This is where Amazon ECS fits in along with a number of other orchestration tools, like Kubernetes, Mesos, and Docker Swarm.

kubernetes vs docker swarm vs mesos

Why ECS?

Compared to some of the other container orchestration tools, ECS is simpler to set up and easier to use. Plus, you have the full power of AWS behind it, so you can easily integrate it into other AWS services (which we'll be doing shortly). In short, you get scheduling, service discovery, load balancing, and auto-scaling out-of-the-box. Plus, you can take full advantage of EC2's multiple availability-zones.

If you're already on AWS and have no desire to leave, then it makes sense to evaluate ECS at the very least.

Keep in mind, that ECS is often lagging behind Kubernetes, in terms of features, though. If you're looking for the most features and portability and you don't mind installing and managing the tool yourself, then Kubernetes, Docker Swarm, or Mesos may be right for you.

One last thing to take note of is that since ECS is closed-source, there isn't a true way to run an environment locally in order to achieve development-to-production parity.

For more, review the Choosing the Right Containerization and Cluster Management Tool and Container orchestration tools explained articles.

Orchestration Feature Wish-List

Most orchestration tools come with a core set of features. You can find those features below along with the associated AWS service.

Feature Info AWS Service
Health checks Verify when a task is ready to accept traffic ALB
Path-based routing Forward requests based on the URL path ALB
Dynamic port-mapping Assign ports dynamically when a new container is spun up ALB
Zero-downtime deployments Deployments do not disrupt the users ALB
Service discovery Automatic detection of new containers and services ALB, ECS
High availability Containers are evenly distributed across Availability Zones ECS
Auto scaling Scaling resources up or down automatically based on fluctuations in traffic patterns or metrics (like CPU usage) ECS
Provisioning New containers should select hosts based on resources and configuration ECS
Container storage Private image storage and management ECR
Container logs Centralized storage of container logs CloudWatch
Monitoring Ability to monitor basic stats like CPU usage, memory, I/O, and network usage as well as set alarms and create events CloudWatch
Secrets management Sensitive info should be encrypted and stored in a centralized store Parameter Store, KMS, IAM

If you're completely new to ECS, please review the What is Amazon Elastic Container Service? guide.

Mark as Completed