SlideShare a Scribd company logo
Amazon EC2 Container
Service
Neeraj Shah
Lead | Minjar Cloud Solutions
Agenda for the Demo
• What EC2 Container Services offers?
• Core Concepts and Terminologies
• Container Scheduling
• Service Discovery
• Cluster Metrics
• Tips & Tricks
Challenges with running containers at scale
• How to scale-up & scale-down?
• Container scheduling
• Fault Tolerance
• Release image updates reliably
• Service Discovery
Container Orchestration
What EC2 Container Services offers
• Cloud native container orchestration
• Store container images in ECS Container Registry
• Works with Docker Hub
• Allows pooling of server resources
• Dynamic container placement
• Auto re-scheduling of failed containers
• Comprehensive metrics for resource utilization
• Near to zero learning curve
ECS Cluster
• Any type of EC2 instances can be added or removed
to a cluster
• Containers are run as an application fleet or on
demand
• Containers are placed on servers which has
resources available
• Provides comprehensive mechanism for container
host selection
• Supports scaling based on CloudWatch metrics
ECS at High Level
Task
ECS Cluster
Amazon EC2 Amazon EC2 Amazon EC2Amazon EC2
Task
TaskDefinition
Task Definitions
• A Task Definition is a template for creating and
scheduling containers
• It Logically groups containers based on their
purpose
• Task definitions are versioned
• Specify CPU & Memory Limits (Hard & Soft)
Task Definitions
• Specify Linux ulimits on containers
• Schedule containers on instances based on rules e.g.
Instance Type or Availability Zone
• Networking Mode (Bridge, Host or None)
• Map volumes between Host & Container
• Created via UI or via API call
Anatomy of Task Definition
Docker Image from ECS Registry of Docker Hub
Constrains for container placement on a host
Host Volumes
Network Mode
Linux Ulimits Process to execute Parameters
CPU Units Memory Hard & Soft Limits
Port Mappings Environment Variables Docker Labels
Volume Mappings etc hosts Log Driver
Container Scheduling Strategies | Service
• Best suited for long running containers
• Maintains specified number of running containers
on the clusters
• Failed containers are re-scheduled
• Allows selection of host instances where task can be
placed
Container Scheduling Strategies | Manual
• Best suited for processes which perform work and
then stop e.g. Queue Processor or Batch Jobs
• Task containers can be created via RunTask API call
• Allows selection of host instances where task can be
placed
Container Placement Algorithms
• Binpack
• Random
• Spread
• Any combination of above strategies
Service Discovery
• AWS Application Load Balancer is a Layer 7 load
balancer
• ECS Integrates with Application Load Balancer to
provide service discovery
• Allows multiple copies of same container to run on
single host
• ECS chooses host port number dynamically from
ephemeral port range (32768 to 61000)
Service Discovery | Alternatives
• HashiCorp’s Consul
• Amazon Route 53
Cluster Metrics
• ECS provides CloudWatch metrics for CPU and
Memory
• CPUReservation / CPUUtilization
• MemoryReservation / MemoryUtilization
• Running Tasks Count
• These metrics can be used to AutoScale containers
Cluster Metrics
Cluster Metrics
Tips & Tricks
• Use SpotFleet for processing back ground task or for
temporary scale out
• Create a frozen AMI with ECS Agent and other
artifacts
• Tag your instance with Cluster name and run a script
during bootup to join a Cluster based on Tag value
neerajx86@gmail.com
http://ArtOfCode.io
Questions?
Thank You

More Related Content

PPTX
Container orchestration overview
PDF
Kubernetes intro
PPTX
Container Orchestration with Docker Swarm and Kubernetes
PDF
Deliver Docker Containers Continuously On AWS - DevOpsCon Munich 2016
PPTX
Topologies of OpenStack
PPTX
PPTX
Introduction to container mangement
PDF
Performance improvements in etcd 3.5 release
Container orchestration overview
Kubernetes intro
Container Orchestration with Docker Swarm and Kubernetes
Deliver Docker Containers Continuously On AWS - DevOpsCon Munich 2016
Topologies of OpenStack
Introduction to container mangement
Performance improvements in etcd 3.5 release

What's hot (20)

PPTX
The Mushroom Cloud Effect or What Happens When Containers Fail? by Alois Mayr...
PDF
Netflix Container Runtime - Titus - for Container Camp 2016
PDF
Docker Container automatisiert nach AWS deployen - Continuous Lifecycle 2016
PDF
Container World 2018
PPTX
Cloud brew cloudcamp
PDF
Federation of Kubernetes Clusters (Ubernetes) KubeCon 2015 slides - Quinton H...
PDF
High availability
PPTX
PPTX
Monitoring Docker containers - Docker NYC Feb 2015
PPTX
Re:invent 2016 Container Scheduling, Execution and AWS Integration
PDF
Long running aws lambda - Joel Schuweiler, Minneapolis
PDF
Monitoring Docker at Scale - Docker San Francisco Meetup - August 11, 2015
PPTX
Docker for Ops: Docker Networking Deep Dive, Considerations and Troubleshooti...
PDF
Running & Monitoring Docker at Scale
PDF
Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...
PDF
Velocity NYC 2016 - Containers @ Netflix
PPTX
EVCache at Netflix
PPTX
Moving Applications into Azure Kubernetes
PDF
Building an Autoscaler for DigitalOcean - DevOps Days Denver 2015
PPTX
Kubernetes Meetup: CNI, Flex Volume, and Scheduler
The Mushroom Cloud Effect or What Happens When Containers Fail? by Alois Mayr...
Netflix Container Runtime - Titus - for Container Camp 2016
Docker Container automatisiert nach AWS deployen - Continuous Lifecycle 2016
Container World 2018
Cloud brew cloudcamp
Federation of Kubernetes Clusters (Ubernetes) KubeCon 2015 slides - Quinton H...
High availability
Monitoring Docker containers - Docker NYC Feb 2015
Re:invent 2016 Container Scheduling, Execution and AWS Integration
Long running aws lambda - Joel Schuweiler, Minneapolis
Monitoring Docker at Scale - Docker San Francisco Meetup - August 11, 2015
Docker for Ops: Docker Networking Deep Dive, Considerations and Troubleshooti...
Running & Monitoring Docker at Scale
Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...
Velocity NYC 2016 - Containers @ Netflix
EVCache at Netflix
Moving Applications into Azure Kubernetes
Building an Autoscaler for DigitalOcean - DevOps Days Denver 2015
Kubernetes Meetup: CNI, Flex Volume, and Scheduler
Ad

Viewers also liked (10)

PDF
AWS Cost Optimisation Made Easy
PPSX
The scaling story of Postman
PPTX
Build and deployment with Jenkins and Code Deploy on AWS
PPTX
Docker Security Overview
PDF
Supporting The Open Web - OSCON 2008
PPTX
Building a Web API with ASP.Net Core
PDF
Open Source in the Cloud Computing Era
PPTX
Kubernetes as Orchestrator for A10 Lightning Controller
PPTX
Stateful set in kubernetes implementation & usecases
PPTX
Introduction to Kubernetes
AWS Cost Optimisation Made Easy
The scaling story of Postman
Build and deployment with Jenkins and Code Deploy on AWS
Docker Security Overview
Supporting The Open Web - OSCON 2008
Building a Web API with ASP.Net Core
Open Source in the Cloud Computing Era
Kubernetes as Orchestrator for A10 Lightning Controller
Stateful set in kubernetes implementation & usecases
Introduction to Kubernetes
Ad

Similar to Leveraging Amzon EC2 Container Services for Container Orchestration (20)

PDF
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
PPTX
Getting Started With Docker on AWS
PDF
Running Docker Containers on AWS
PPTX
AWS ECS Meetup Talentica
PPTX
Docker on AWS - the Right Way
PDF
Amazon ECS (March 2016)
PDF
ECS and ECR deep dive
PPTX
Tech connect aws
PPTX
Docker on Amazon ECS
PDF
Getting Started with Docker on AWS
PDF
Amazon EC2 container service
PPTX
Amazon ECS.pptx tasks conatiner ecs new car
PDF
Getting started with Amazon ECS
PDF
Running Docker clusters on AWS (November 2016)
PDF
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
PDF
Running Docker clusters on AWS (June 2016)
PDF
Amazon ECS (December 2015)
PPTX
ECS and Docker at Okta
PDF
ecs-presentation
PPTX
ECS - from 0 to 100
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
Getting Started With Docker on AWS
Running Docker Containers on AWS
AWS ECS Meetup Talentica
Docker on AWS - the Right Way
Amazon ECS (March 2016)
ECS and ECR deep dive
Tech connect aws
Docker on Amazon ECS
Getting Started with Docker on AWS
Amazon EC2 container service
Amazon ECS.pptx tasks conatiner ecs new car
Getting started with Amazon ECS
Running Docker clusters on AWS (November 2016)
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
Running Docker clusters on AWS (June 2016)
Amazon ECS (December 2015)
ECS and Docker at Okta
ecs-presentation
ECS - from 0 to 100

Recently uploaded (20)

PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Digital Strategies for Manufacturing Companies
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
System and Network Administration Chapter 2
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
history of c programming in notes for students .pptx
PPTX
Transform Your Business with a Software ERP System
PDF
Nekopoi APK 2025 free lastest update
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Introduction to Artificial Intelligence
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Softaken Excel to vCard Converter Software.pdf
Digital Strategies for Manufacturing Companies
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
VVF-Customer-Presentation2025-Ver1.9.pptx
How to Migrate SBCGlobal Email to Yahoo Easily
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
System and Network Administration Chapter 2
Which alternative to Crystal Reports is best for small or large businesses.pdf
history of c programming in notes for students .pptx
Transform Your Business with a Software ERP System
Nekopoi APK 2025 free lastest update
Odoo POS Development Services by CandidRoot Solutions
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Design an Analysis of Algorithms II-SECS-1021-03
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
CHAPTER 2 - PM Management and IT Context
Upgrade and Innovation Strategies for SAP ERP Customers
Design an Analysis of Algorithms I-SECS-1021-03
Introduction to Artificial Intelligence
Internet Downloader Manager (IDM) Crack 6.42 Build 41

Leveraging Amzon EC2 Container Services for Container Orchestration

  • 1. Amazon EC2 Container Service Neeraj Shah Lead | Minjar Cloud Solutions
  • 2. Agenda for the Demo • What EC2 Container Services offers? • Core Concepts and Terminologies • Container Scheduling • Service Discovery • Cluster Metrics • Tips & Tricks
  • 3. Challenges with running containers at scale • How to scale-up & scale-down? • Container scheduling • Fault Tolerance • Release image updates reliably • Service Discovery
  • 5. What EC2 Container Services offers • Cloud native container orchestration • Store container images in ECS Container Registry • Works with Docker Hub • Allows pooling of server resources • Dynamic container placement • Auto re-scheduling of failed containers • Comprehensive metrics for resource utilization • Near to zero learning curve
  • 6. ECS Cluster • Any type of EC2 instances can be added or removed to a cluster • Containers are run as an application fleet or on demand • Containers are placed on servers which has resources available • Provides comprehensive mechanism for container host selection • Supports scaling based on CloudWatch metrics
  • 7. ECS at High Level Task ECS Cluster Amazon EC2 Amazon EC2 Amazon EC2Amazon EC2 Task TaskDefinition
  • 8. Task Definitions • A Task Definition is a template for creating and scheduling containers • It Logically groups containers based on their purpose • Task definitions are versioned • Specify CPU & Memory Limits (Hard & Soft)
  • 9. Task Definitions • Specify Linux ulimits on containers • Schedule containers on instances based on rules e.g. Instance Type or Availability Zone • Networking Mode (Bridge, Host or None) • Map volumes between Host & Container • Created via UI or via API call
  • 10. Anatomy of Task Definition Docker Image from ECS Registry of Docker Hub Constrains for container placement on a host Host Volumes Network Mode Linux Ulimits Process to execute Parameters CPU Units Memory Hard & Soft Limits Port Mappings Environment Variables Docker Labels Volume Mappings etc hosts Log Driver
  • 11. Container Scheduling Strategies | Service • Best suited for long running containers • Maintains specified number of running containers on the clusters • Failed containers are re-scheduled • Allows selection of host instances where task can be placed
  • 12. Container Scheduling Strategies | Manual • Best suited for processes which perform work and then stop e.g. Queue Processor or Batch Jobs • Task containers can be created via RunTask API call • Allows selection of host instances where task can be placed
  • 13. Container Placement Algorithms • Binpack • Random • Spread • Any combination of above strategies
  • 14. Service Discovery • AWS Application Load Balancer is a Layer 7 load balancer • ECS Integrates with Application Load Balancer to provide service discovery • Allows multiple copies of same container to run on single host • ECS chooses host port number dynamically from ephemeral port range (32768 to 61000)
  • 15. Service Discovery | Alternatives • HashiCorp’s Consul • Amazon Route 53
  • 16. Cluster Metrics • ECS provides CloudWatch metrics for CPU and Memory • CPUReservation / CPUUtilization • MemoryReservation / MemoryUtilization • Running Tasks Count • These metrics can be used to AutoScale containers
  • 19. Tips & Tricks • Use SpotFleet for processing back ground task or for temporary scale out • Create a frozen AMI with ECS Agent and other artifacts • Tag your instance with Cluster name and run a script during bootup to join a Cluster based on Tag value