One of the core principles behind the design of Amazon ECS is the separation of the scheduling logic from the state management. This allows you to use the Amazon ECS schedulers, write your own schedulers, or integrate with third party schedulers.
In this session we will explore the advanced cluster management capabilities of Amazon ECS and dive deep into the Amazon ECS Service Scheduler, which supports long-running applications by monitoring container health, restarting failed containers, and load balancing across containers. We will explain how you can communicate with the Amazon ECS API in order to integrate your own custom schedulers. We will then walk through how we built an Apache Mesos scheduler driver that enables you to integrate Mesos scheduling frameworks to work with Amazon ECS without requiring a Mesos cluster. We will also demo using Marathon to schedule Docker containers on an Amazon ECS cluster.
AWS DevDay San Francisco, June 21, 2016.
Presenter: Dan Gerdesmeier, Sr. Software Development Engineer
3. What is Amazon ECS?
Amazon EC2 Container Service (ECS) is a highly scalable,
high performance container management service. You
can use Amazon ECS to schedule the placement of
containers across your cluster. You can also integrate your
own scheduler or third-party scheduler to meet business
or application specific requirements.
10. Monolithic Scheduler
Pros
• Entire State
• Consistent View
• Easy to Understand
Cons
• Head-of-Line blocking
• Difficult to maintain
• Single Point of Failure
17. Shared State Scheduling
Pros
• Full State
• Enables Multiple
Schedulers
• No Head-Of-Line
Blocking
Cons
• Contention can Slow
Progress
• Multiple Copies of State
• Stale Information
42. ECS Schedulers
Batch Jobs
ECS Task scheduler
Run tasks once
Batch jobs
RunTask (random)
StartTask (placed)
Long-Running Apps
ECS Service scheduler
Health management
Scale-up and scale-down
AZ aware
Grouped Containers
43. Custom Schedulers
1. Calls the ECS List* and Describe* API operations to
determine the current state of the cluster.
2. Selects one (or more) container instances according to
the logic implemented.
3. Calls StartTask API to start a task on the selected
container instance.
45. Integration with third party schedulers
ECS allows you to use third party schedulers, e.g.
Marathon and Chronos
Integration via ECS API
For Mesos schedulers, the ECSSchedulerDriver interprets
the command given when scheduling jobs with Mesos and
starts a task with TaskDefinition family:revision
https://github.com/awslabs/ecs-mesos-scheduler-driver