SlideShare une entreprise Scribd logo
1  sur  73
Running Containerised Applications at
scale on AWS
What to Expect From This Session
• Why Containers & how they are used
• Challenges of scaling containerised workloads
• How to scale containerised workloads using Amazon ECS
Why Containers?
Why Containers?
Environment
Consistency
Why Containers?
Environment
Consistency
Developer
Productivity
Version
Control
Operational
Efficiency
Why Containers?
Serverless? Containers?
Monolithic vs SOA vs Microservices
SOA
Coarse-grained
Microservices
Fine-grained
Monolithic
Single Unit
Monolithic Architecture
Order UI User UI Shipping UI
Order
Service
User Service
Shipping
Service
Data Access
Monolithic Architecture
Monolithic Architecture
Microservices Architecture
Order UI User UI
Shipping
UI
Order Service
User
Service
Shipping
Service
Scaling Microservices
Order UI User UI UI
Order Service Service
Shipping
Service
Order UI
Order UI
User UI UIShipping
UI
Order Service
Order Service
Service
Service
Service
Service
User
Service
Shipping
Service
Challenges of Scaling
Containerised Workloads
Going from this…
Server
Guest OS
Bins/Libs Bins/Libs
App2App1
..to this – is hard!
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Challenges running containers at scale
Resources and State Management
Monitoring
Service Discovery
Deployment
Challenges running containers at scale
Resources and State Management
Monitoring
Service Discovery
Deployment
Orchestration vs Choreography
Amazon ECS Concepts
•Clusters
•Tasks
•Services
Amazon ECS Concepts
Regional
Resource Pool
Grouping of
Container Instances
Start Empty,
Scale Dynamically
Amazon ECS Concepts - Clusters
EC2
INSTANCES
ECS
AGENT
ECS
AGENT
AGENT COMMUNICATION
SERVICE
Amazon ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
ECS
AGENT
Amazon ECS Concepts - Clusters
EC2
INSTANCES
ECS
AGENT
ECS
AGENT
AGENT COMMUNICATION
SERVICE
Amazon ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
ECS
AGENT
Amazon ECS Concepts - Tasks
•Unit of work
•Grouping of related containers
•Run on container instances
Amazon ECS Concepts - Tasks
EC2
INSTANCES
ECS
AGENT
ECS
AGENT
AGENT COMMUNICATION
SERVICE
Amazon ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
ECS
AGENT
TASK
Container
TASK
Container
TASK
Container
TASK
Container
TASK
Container
TASK
Container
TASK
Container
TASK
Container
Amazon ECS Concepts - Tasks
EC2
INSTANCES
ECS
AGENT
ECS
AGENT
AGENT COMMUNICATION
SERVICE
Amazon ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
ECS
AGENT
TASK
Container
TASK
Container
TASK
Container
TASK
Container
TASK
Container
TASK
Container
TASK
Container
TASK
Container
Amazon ECS Concepts - Services
•Good for long-running applications
•Load balance traffic across containers
•Automatically recover unhealthy containers
•Discover services
Amazon ECS Concepts - Services
LOAD
BALANCER
Internet
EC2
INSTANCES
ECS
AGENT
ECS
AGENT
AGENT COMMUNICATION
SERVICE
Amazon ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
ECS
AGENT
TASK
Container
TASK
Container
TASK
Container
TASK
Container
TASK
Container
TASK
Container
TASK
Container
TASK
Container
LOAD
BALANCER
Amazon ECS Concepts - Services
Internet
EC2
INSTANCES
ECS
AGENT
ECS
AGENT
AGENT COMMUNICATION
SERVICE
Amazon ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
ECS
AGENT
TASK
Container
TASK
Container
TASK
Container
TASK
Container
TASK
Container
TASK
Container
TASK
Container
TASK
Container
LOAD
BALANCER
LOAD
BALANCER
Application Auto Scaling
AMAZON ECS
AMAZON
CLOUDWATCH
ELASTIC LOAD
BALANCING
Auto Scaling ECS cluster
Application Auto Scaling
AMAZON ECS
Publish
metrics
AMAZON
CLOUDWATCH
ELASTIC LOAD
BALANCING
Auto Scaling ECS cluster
Scale in / out
policies
Application Auto Scaling
AMAZON ECS
Publish
metrics
AMAZON
CLOUDWATCH
ELASTIC LOAD
BALANCING
Auto Scaling ECS cluster
Add/remove
ECS tasks
Scale in / out
policies
Application Auto Scaling
AMAZON ECS
Publish
metrics
AMAZON
CLOUDWATCH
ELASTIC LOAD
BALANCING
Auto Scaling ECS cluster
Add/remove
ECS tasks
Scale in / out
policies
Application Auto Scaling
AMAZON ECS
Publish
metrics
AMAZON
CLOUDWATCH
ELASTIC LOAD
BALANCING
Auto Scaling ECS cluster
Add/remove
ECS tasks
Scale in / out
policies
Application Auto Scaling
AMAZON ECS
Publish
metrics
AMAZON
CLOUDWATCH
ELASTIC LOAD
BALANCING
Auto Scaling ECS cluster
Add/remove
ECS tasks
Scale in / out
policies
Flexible Container Placement
•Applications
•Batch Jobs
•Multiple Schedulers
Designed for Use with Other AWS Services
• Elastic Load Balancing (ELB)
• Application Load Balancing (ALB)
• Amazon Elastic Block Store (EBS)
• Amazon Virtual Private Cloud (VPC)
• AWS Identity and Access Management
• AWS CloudTrail
http://www.slideshare.net/AmazonWebServices/aws-reinvent-2016-running-batch-jobs-on-amazon-ecs-con310
Scalable
Demo – app.catsndogs.lol
Challenges running containers at scale
Resources and State Management
Monitoring
Service Discovery
Deployment
Service Discovery with ALB
TASK A TASK A TASK A
Application Load
Balancer
Service Discovery with DNS
https://github.com/awslabs/service-discovery-ecs-dns
TASK A TASK B TASK C
ecssd_agent ecssd_agent
Route53 Private
Hosted Zone
Service Discovery with DNS
https://github.com/awslabs/service-discovery-ecs-dns
TASK A TASK B TASK C
ecssd_agent ecssd_agent
Route53 Private
Hosted Zone
Service Discovery with Weaveworks
•DNS interface for cross-host container communication
•Gossip protocol to share grouped updates
•Overlay network between hosts
Service Discovery with Weaveworks
HTTP Server
Data Producer
Docker
Weave
Router/DNS
Weave Proxy
ECS Agent
ECS Task
HTTP Server
Data Producer
Docker
Weave
Router/DNS
Weave Proxy
ECS Agent
ECS Task
HTTP Server
Data Producer
Docker
Weave
Router/DNS
Weave Proxy
ECS Agent
ECS Task
Amazon ECS Infrastructure
Service Discovery with Consul
• Consul Agent – Runs on each node, responsible for checking the
health of the services and of the node itself.
• One or more Consul servers – Store and replicate data, leader
elected using the Raft consensus algorithm
• Registrator agent – Automatically register / deregisters services
based on published ports and metadata from the container
environment variables defined in the ECS task definition
Service Discovery with Consul
Back end 1
Back end 2
Registrator
Consul Agent
Front end
Registrator
Consul Agent
Consul-Server
ECSClusterECSCluster
Challenges running containers at scale
Resources and State Management
Monitoring
Service Discovery
Deployment
Monitoring with Amazon CloudWatch
• Metric data sent to CloudWatch in 1-minute periods and
recorded for a period of two weeks
• Available metrics: CPUReservation, MemoryReservation,
CPUUtilization, MemoryUtilization
• Available dimensions: ClusterName, ServiceName
Monitoring with Amazon CloudWatch
Monitoring with Amazon CloudWatch
• Use the CloudWatch monitoring scripts to monitor additional
metrics, e.g. disk space:
# Edit crontab
> crontab -e
# Add command to report disk space utilization to CloudWatch every five minutes
*/5 * * * * <path_to>/mon-put-instance-data.pl --disk-space-util --disk-space-used --disk-
space-avail --disk-path=/ --from-cron
Logging with CloudWatch Logs
{
"image": ”nginx:latest",
...
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": ”nginx",
"awslogs-region": "us-east-1"
}
}
{
• Defined within the task definition
• Available log drivers:
• awslogs
• fluentd
• splunk
• syslog
Challenges running containers at scale
Resources and State Management
Monitoring
Service Discovery
Deployment
Scheduling Containers: Long Running App
•Deploy using least space: minimumHealthyPercent = 50%,
maximumPercent = 100%
Instance 1 Instance 2 Instance 3 Instance 4 Instance 5
Task 1 Task 2 Task 3 Task 4
Scheduling Containers: Long Running App
•Deploy using least space: minimumHealthyPercent = 50%,
maximumPercent = 100%
Instance 1 Instance 2 Instance 3 Instance 4 Instance 5
Task 1 Task 2 Task 3 Task 4
Scheduling Containers: Long Running App
•Deploy using least space: minimumHealthyPercent = 50%,
maximumPercent = 100%
Instance 1 Instance 2 Instance 3 Instance 4 Instance 5
Task 1 Task 2 Task 3 Task 4
Scheduling Containers: Long Running App
•Deploy quickly without reducing service capacity::
minimumHealthyPercent = 100%, maximumPercent = 200%
Instance 1 Instance 2 Instance 3 Instance 4 Instance 5 Instance 6 Instance 7 Instance 8
Task 1 Task 2 Task 3 Task 4
Scheduling Containers: Long Running App
•Deploy quickly without reducing service capacity::
minimumHealthyPercent = 100%, maximumPercent = 200%
Instance 1 Instance 2 Instance 3 Instance 4 Instance 5 Instance 6 Instance 7 Instance 8
Task 1 Task 2 Task 3 Task 4 Task 5 Task 6 Task 7 Task 8
Scheduling Containers: Long Running App
•Deploy quickly without reducing service capacity::
minimumHealthyPercent = 100%, maximumPercent = 200%
Instance 1 Instance 2 Instance 3 Instance 4 Instance 5 Instance 6 Instance 7 Instance 8
Task 5 Task 6 Task 7 Task 8
Scheduling Containers: Long Running App
• Blue-Green Deployments
• Define two ECS services
• Each service is associated w/ ELB
• Both ELBs in Route 53 record set
with weighted routing policy, 100%
primary, 0% secondary
• Deploy to blue or green service and
switch weights
TASK A TASK B
Route53 Record Set
With Weighted Routing
Policy
100% 0%
IAM Roles for Tasks
DynamoDB
ECS Cluster
EC2 Instance EC2 Instance
TASK A
TASK B
TASK B
S3 Storage
Demo – app.catsndogs.lol
ECS Placement Strategies
Binpacking Spread Affinity Distinct Instance
Placement: Targeting Instance Type
g2.2xlarge t2.small g2.2xlarge g2.2xlarge
Placement: Targeting Instance Type & Zone
g2.2xlarge t2.small t2.micro t2.medium
t2.medium t2.small g2.2xlarge
t2.small
t2.small t2.medium
us-east-1aus-east-1d
Placement: Spread across Zone and Binpack
g2.2xlarge t2.small t2.micro t2.medium
t2.medium t2.small g2.2xlarge t2.small
us-east-1aus-east-1d
g2.2xlarge t2.medium
t2.micro t2.small
us-east-1c
Placement: Affinity and Anti-Affinity
g2.2xlarge t2.small t2.micro t2.medium
t2.medium t2.small g2.2xlarge t2.small
us-east-1aus-east-1d
g2.2xlarge t2.medium
t2.micro t2.small
us-east-1c
Placement: Distinct Instances
t2.medium g2.2xlarge t2.micro t2.small
t2.small t2.small g2.2xlarge t2.small
t2.small t2.small
g2.2xlarge t2.small
Demo – app.catsndogs.lol
AWS
CodeCommit
AWS
CodePipeline
AWS
CodeBuild
Amazon ECR
Amazon ECS
instance
Spot
Instance
AWS
CloudFormation
1. Commit
Code
2. Trigger
Pipeline
3.Build
Artifact
5. Update
Stack
6. Update Service
4. Push Image
Reference Architecture
New Features!
• ECS adds console support for Spot fleet creation
• https://aws.amazon.com/about-aws/whats-new/2017/06/amazon-ecs-
adds-console-support-for-spot-fleet-creation/
• ECS adds support for time and event based scheduling
• https://aws.amazon.com/about-aws/whats-new/2017/06/amazon-ecs-now-
supports-time-and-event-based-task-scheduling/
Thank You

Contenu connexe

Tendances

Build a Serverless Web Application in One Day - DevDay Austin 2017
Build a Serverless Web Application in One Day - DevDay Austin 2017Build a Serverless Web Application in One Day - DevDay Austin 2017
Build a Serverless Web Application in One Day - DevDay Austin 2017
Amazon Web Services
 
Building a CICD Pipeline for Containers - DevDay Austin 2017
Building a CICD Pipeline for Containers - DevDay Austin 2017Building a CICD Pipeline for Containers - DevDay Austin 2017
Building a CICD Pipeline for Containers - DevDay Austin 2017
Amazon Web Services
 

Tendances (20)

Ceate a Scalable Cloud Architecture
Ceate a Scalable Cloud ArchitectureCeate a Scalable Cloud Architecture
Ceate a Scalable Cloud Architecture
 
AWS re:Invent 2016: Save up to 90% and Run Production Workloads on Spot - Fea...
AWS re:Invent 2016: Save up to 90% and Run Production Workloads on Spot - Fea...AWS re:Invent 2016: Save up to 90% and Run Production Workloads on Spot - Fea...
AWS re:Invent 2016: Save up to 90% and Run Production Workloads on Spot - Fea...
 
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
 
CI/CD on AWS: Deploy Everything All the Time | AWS Public Sector Summit 2016
CI/CD on AWS: Deploy Everything All the Time | AWS Public Sector Summit 2016CI/CD on AWS: Deploy Everything All the Time | AWS Public Sector Summit 2016
CI/CD on AWS: Deploy Everything All the Time | AWS Public Sector Summit 2016
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECS
 
AWS re:Invent 2016: Introduction to Container Management on AWS (CON303)
AWS re:Invent 2016: Introduction to Container Management on AWS (CON303)AWS re:Invent 2016: Introduction to Container Management on AWS (CON303)
AWS re:Invent 2016: Introduction to Container Management on AWS (CON303)
 
AWS CodeDeploy
AWS CodeDeployAWS CodeDeploy
AWS CodeDeploy
 
Deep Dive on Elastic Load Balancing
Deep Dive on Elastic Load BalancingDeep Dive on Elastic Load Balancing
Deep Dive on Elastic Load Balancing
 
What's New with AWS Lambda
What's New with AWS LambdaWhat's New with AWS Lambda
What's New with AWS Lambda
 
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
 
Build a Serverless Web Application in One Day - DevDay Austin 2017
Build a Serverless Web Application in One Day - DevDay Austin 2017Build a Serverless Web Application in One Day - DevDay Austin 2017
Build a Serverless Web Application in One Day - DevDay Austin 2017
 
AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...
AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...
AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...
 
Building a CICD Pipeline for Containers - DevDay Austin 2017
Building a CICD Pipeline for Containers - DevDay Austin 2017Building a CICD Pipeline for Containers - DevDay Austin 2017
Building a CICD Pipeline for Containers - DevDay Austin 2017
 
AWS re:Invent 2016: Securing Container-Based Applications (CON402)
AWS re:Invent 2016: Securing Container-Based Applications (CON402)AWS re:Invent 2016: Securing Container-Based Applications (CON402)
AWS re:Invent 2016: Securing Container-Based Applications (CON402)
 
Advanced Container Management and Scheduling
Advanced Container Management and SchedulingAdvanced Container Management and Scheduling
Advanced Container Management and Scheduling
 
Announcing Amazon Lightsail - January 2017 AWS Online Tech Talks
Announcing Amazon Lightsail - January 2017 AWS Online Tech TalksAnnouncing Amazon Lightsail - January 2017 AWS Online Tech Talks
Announcing Amazon Lightsail - January 2017 AWS Online Tech Talks
 
Deep Dive with Amazon EC2 Container Service Hands-on Workshop
Deep Dive with Amazon EC2 Container Service Hands-on WorkshopDeep Dive with Amazon EC2 Container Service Hands-on Workshop
Deep Dive with Amazon EC2 Container Service Hands-on Workshop
 
Best Practices with IoT Security - February Online Tech Talks
Best Practices with IoT Security - February Online Tech TalksBest Practices with IoT Security - February Online Tech Talks
Best Practices with IoT Security - February Online Tech Talks
 
Continuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECS Continuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECS
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 

En vedette

Video onesheeter-jun2015
Video onesheeter-jun2015Video onesheeter-jun2015
Video onesheeter-jun2015
NVIDIA
 

En vedette (17)

NVIDIA CES 2016 Highlights
NVIDIA CES 2016 HighlightsNVIDIA CES 2016 Highlights
NVIDIA CES 2016 Highlights
 
NVIDIA SAP Sapphire 2017 Show Guide
NVIDIA SAP Sapphire 2017 Show Guide NVIDIA SAP Sapphire 2017 Show Guide
NVIDIA SAP Sapphire 2017 Show Guide
 
NVIDIA Testimony at Senate Commerce, Science, and Transportation Committee He...
NVIDIA Testimony at Senate Commerce, Science, and Transportation Committee He...NVIDIA Testimony at Senate Commerce, Science, and Transportation Committee He...
NVIDIA Testimony at Senate Commerce, Science, and Transportation Committee He...
 
Managing Container Images with Amazon ECR - AWS Online Tech Talks
Managing Container Images with Amazon ECR - AWS Online Tech TalksManaging Container Images with Amazon ECR - AWS Online Tech Talks
Managing Container Images with Amazon ECR - AWS Online Tech Talks
 
Compare Streaming Media Players With NVIDIA SHIELD
Compare Streaming Media Players With NVIDIA SHIELDCompare Streaming Media Players With NVIDIA SHIELD
Compare Streaming Media Players With NVIDIA SHIELD
 
Video onesheeter-jun2015
Video onesheeter-jun2015Video onesheeter-jun2015
Video onesheeter-jun2015
 
Artificial Intelligence (AI) 100 Startups 2017
Artificial Intelligence (AI) 100 Startups 2017Artificial Intelligence (AI) 100 Startups 2017
Artificial Intelligence (AI) 100 Startups 2017
 
Working with Amazon Lex Chatbots in Amazon Connect - AWS Online Tech Talks
Working with Amazon Lex Chatbots in Amazon Connect - AWS Online Tech TalksWorking with Amazon Lex Chatbots in Amazon Connect - AWS Online Tech Talks
Working with Amazon Lex Chatbots in Amazon Connect - AWS Online Tech Talks
 
HPC Top 5 Stories: October 13, 2017
HPC Top 5 Stories: October 13, 2017HPC Top 5 Stories: October 13, 2017
HPC Top 5 Stories: October 13, 2017
 
GTC 2016 Opening Keynote
GTC 2016 Opening KeynoteGTC 2016 Opening Keynote
GTC 2016 Opening Keynote
 
Revolutionizing Radiology with Deep Learning: The Road to RSNA 2017
Revolutionizing Radiology with Deep Learning: The Road to RSNA 2017Revolutionizing Radiology with Deep Learning: The Road to RSNA 2017
Revolutionizing Radiology with Deep Learning: The Road to RSNA 2017
 
Top 5 Deep Learning and AI Stories - November 3, 2017
Top 5 Deep Learning and AI Stories - November 3, 2017Top 5 Deep Learning and AI Stories - November 3, 2017
Top 5 Deep Learning and AI Stories - November 3, 2017
 
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot InstancesWKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
 
Sentiment Analysis Using Apache MXNet and Gluon - AWS Online Tech Talks
Sentiment Analysis Using Apache MXNet and Gluon - AWS Online Tech TalksSentiment Analysis Using Apache MXNet and Gluon - AWS Online Tech Talks
Sentiment Analysis Using Apache MXNet and Gluon - AWS Online Tech Talks
 
Building Serverless Websites with Lambda@Edge - AWS Online Tech Talks
Building Serverless Websites with Lambda@Edge - AWS Online Tech TalksBuilding Serverless Websites with Lambda@Edge - AWS Online Tech Talks
Building Serverless Websites with Lambda@Edge - AWS Online Tech Talks
 
Top 5 Deep Learning and AI Stories - October 6, 2017
Top 5 Deep Learning and AI Stories - October 6, 2017Top 5 Deep Learning and AI Stories - October 6, 2017
Top 5 Deep Learning and AI Stories - October 6, 2017
 
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017
 

Similaire à Running Containerised Applications at Scale on AWS

AWS re:Invent 2016: Operations Automation and Infrastructure Management with ...
AWS re:Invent 2016: Operations Automation and Infrastructure Management with ...AWS re:Invent 2016: Operations Automation and Infrastructure Management with ...
AWS re:Invent 2016: Operations Automation and Infrastructure Management with ...
Amazon Web Services
 

Similaire à Running Containerised Applications at Scale on AWS (20)

Running Microservices on Amazon ECS - AWS April 2016 Webinar Series
Running Microservices on Amazon ECS - AWS April 2016 Webinar SeriesRunning Microservices on Amazon ECS - AWS April 2016 Webinar Series
Running Microservices on Amazon ECS - AWS April 2016 Webinar Series
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECS
 
Deep Dive on Microservices and Amazon ECS by Raul Frias, Solutions Architect,...
Deep Dive on Microservices and Amazon ECS by Raul Frias, Solutions Architect,...Deep Dive on Microservices and Amazon ECS by Raul Frias, Solutions Architect,...
Deep Dive on Microservices and Amazon ECS by Raul Frias, Solutions Architect,...
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECS
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECS
 
Micrsoservices unleashed with containers and ECS
Micrsoservices unleashed with containers and ECSMicrsoservices unleashed with containers and ECS
Micrsoservices unleashed with containers and ECS
 
AWS re:Invent 2016: Operations Automation and Infrastructure Management with ...
AWS re:Invent 2016: Operations Automation and Infrastructure Management with ...AWS re:Invent 2016: Operations Automation and Infrastructure Management with ...
AWS re:Invent 2016: Operations Automation and Infrastructure Management with ...
 
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container DayECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECS
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWS
 
Advanced Container Scheduling
Advanced Container SchedulingAdvanced Container Scheduling
Advanced Container Scheduling
 
Advanced Container Management and Scheduling
Advanced Container Management and SchedulingAdvanced Container Management and Scheduling
Advanced Container Management and Scheduling
 
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2
 
Deep Dive on Microservices and Docker - AWS Summit Cape Town 2017
Deep Dive on Microservices and Docker - AWS Summit Cape Town 2017Deep Dive on Microservices and Docker - AWS Summit Cape Town 2017
Deep Dive on Microservices and Docker - AWS Summit Cape Town 2017
 
[AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
 [AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵 [AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
[AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
 
Getting Started with Docker on AWS
Getting Started with Docker on AWSGetting Started with Docker on AWS
Getting Started with Docker on AWS
 
Amazon ECS with Docker | AWS Public Sector Summit 2016
Amazon ECS with Docker | AWS Public Sector Summit 2016Amazon ECS with Docker | AWS Public Sector Summit 2016
Amazon ECS with Docker | AWS Public Sector Summit 2016
 
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECSWeaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
Weaveworks at AWS re:Invent 2016: Operations Management with Amazon ECS
 
初探 AWS 平台上的 Docker 服務
初探 AWS 平台上的 Docker 服務初探 AWS 平台上的 Docker 服務
初探 AWS 平台上的 Docker 服務
 
ECS and ECR deep dive
ECS and ECR deep diveECS and ECR deep dive
ECS and ECR deep dive
 

Plus de Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Plus de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Dernier (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Running Containerised Applications at Scale on AWS

  • 2. What to Expect From This Session • Why Containers & how they are used • Challenges of scaling containerised workloads • How to scale containerised workloads using Amazon ECS
  • 5.
  • 8. Monolithic vs SOA vs Microservices SOA Coarse-grained Microservices Fine-grained Monolithic Single Unit
  • 9. Monolithic Architecture Order UI User UI Shipping UI Order Service User Service Shipping Service Data Access
  • 12. Microservices Architecture Order UI User UI Shipping UI Order Service User Service Shipping Service
  • 13. Scaling Microservices Order UI User UI UI Order Service Service Shipping Service Order UI Order UI User UI UIShipping UI Order Service Order Service Service Service Service Service User Service Shipping Service
  • 15. Going from this… Server Guest OS Bins/Libs Bins/Libs App2App1
  • 16. ..to this – is hard! Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS
  • 17. Challenges running containers at scale Resources and State Management Monitoring Service Discovery Deployment
  • 18. Challenges running containers at scale Resources and State Management Monitoring Service Discovery Deployment
  • 21. Amazon ECS Concepts Regional Resource Pool Grouping of Container Instances Start Empty, Scale Dynamically
  • 22. Amazon ECS Concepts - Clusters EC2 INSTANCES ECS AGENT ECS AGENT AGENT COMMUNICATION SERVICE Amazon ECS API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT ECS AGENT
  • 23. Amazon ECS Concepts - Clusters EC2 INSTANCES ECS AGENT ECS AGENT AGENT COMMUNICATION SERVICE Amazon ECS API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT ECS AGENT
  • 24. Amazon ECS Concepts - Tasks •Unit of work •Grouping of related containers •Run on container instances
  • 25. Amazon ECS Concepts - Tasks EC2 INSTANCES ECS AGENT ECS AGENT AGENT COMMUNICATION SERVICE Amazon ECS API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT ECS AGENT TASK Container TASK Container TASK Container TASK Container TASK Container TASK Container TASK Container TASK Container
  • 26. Amazon ECS Concepts - Tasks EC2 INSTANCES ECS AGENT ECS AGENT AGENT COMMUNICATION SERVICE Amazon ECS API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT ECS AGENT TASK Container TASK Container TASK Container TASK Container TASK Container TASK Container TASK Container TASK Container
  • 27. Amazon ECS Concepts - Services •Good for long-running applications •Load balance traffic across containers •Automatically recover unhealthy containers •Discover services
  • 28. Amazon ECS Concepts - Services LOAD BALANCER Internet EC2 INSTANCES ECS AGENT ECS AGENT AGENT COMMUNICATION SERVICE Amazon ECS API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT ECS AGENT TASK Container TASK Container TASK Container TASK Container TASK Container TASK Container TASK Container TASK Container LOAD BALANCER
  • 29. Amazon ECS Concepts - Services Internet EC2 INSTANCES ECS AGENT ECS AGENT AGENT COMMUNICATION SERVICE Amazon ECS API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT ECS AGENT TASK Container TASK Container TASK Container TASK Container TASK Container TASK Container TASK Container TASK Container LOAD BALANCER LOAD BALANCER
  • 30. Application Auto Scaling AMAZON ECS AMAZON CLOUDWATCH ELASTIC LOAD BALANCING Auto Scaling ECS cluster
  • 31. Application Auto Scaling AMAZON ECS Publish metrics AMAZON CLOUDWATCH ELASTIC LOAD BALANCING Auto Scaling ECS cluster Scale in / out policies
  • 32. Application Auto Scaling AMAZON ECS Publish metrics AMAZON CLOUDWATCH ELASTIC LOAD BALANCING Auto Scaling ECS cluster Add/remove ECS tasks Scale in / out policies
  • 33. Application Auto Scaling AMAZON ECS Publish metrics AMAZON CLOUDWATCH ELASTIC LOAD BALANCING Auto Scaling ECS cluster Add/remove ECS tasks Scale in / out policies
  • 34. Application Auto Scaling AMAZON ECS Publish metrics AMAZON CLOUDWATCH ELASTIC LOAD BALANCING Auto Scaling ECS cluster Add/remove ECS tasks Scale in / out policies
  • 35. Application Auto Scaling AMAZON ECS Publish metrics AMAZON CLOUDWATCH ELASTIC LOAD BALANCING Auto Scaling ECS cluster Add/remove ECS tasks Scale in / out policies
  • 37. Designed for Use with Other AWS Services • Elastic Load Balancing (ELB) • Application Load Balancing (ALB) • Amazon Elastic Block Store (EBS) • Amazon Virtual Private Cloud (VPC) • AWS Identity and Access Management • AWS CloudTrail
  • 41. Challenges running containers at scale Resources and State Management Monitoring Service Discovery Deployment
  • 42. Service Discovery with ALB TASK A TASK A TASK A Application Load Balancer
  • 43. Service Discovery with DNS https://github.com/awslabs/service-discovery-ecs-dns TASK A TASK B TASK C ecssd_agent ecssd_agent Route53 Private Hosted Zone
  • 44. Service Discovery with DNS https://github.com/awslabs/service-discovery-ecs-dns TASK A TASK B TASK C ecssd_agent ecssd_agent Route53 Private Hosted Zone
  • 45. Service Discovery with Weaveworks •DNS interface for cross-host container communication •Gossip protocol to share grouped updates •Overlay network between hosts
  • 46. Service Discovery with Weaveworks HTTP Server Data Producer Docker Weave Router/DNS Weave Proxy ECS Agent ECS Task HTTP Server Data Producer Docker Weave Router/DNS Weave Proxy ECS Agent ECS Task HTTP Server Data Producer Docker Weave Router/DNS Weave Proxy ECS Agent ECS Task Amazon ECS Infrastructure
  • 47. Service Discovery with Consul • Consul Agent – Runs on each node, responsible for checking the health of the services and of the node itself. • One or more Consul servers – Store and replicate data, leader elected using the Raft consensus algorithm • Registrator agent – Automatically register / deregisters services based on published ports and metadata from the container environment variables defined in the ECS task definition
  • 48. Service Discovery with Consul Back end 1 Back end 2 Registrator Consul Agent Front end Registrator Consul Agent Consul-Server ECSClusterECSCluster
  • 49. Challenges running containers at scale Resources and State Management Monitoring Service Discovery Deployment
  • 50. Monitoring with Amazon CloudWatch • Metric data sent to CloudWatch in 1-minute periods and recorded for a period of two weeks • Available metrics: CPUReservation, MemoryReservation, CPUUtilization, MemoryUtilization • Available dimensions: ClusterName, ServiceName
  • 52. Monitoring with Amazon CloudWatch • Use the CloudWatch monitoring scripts to monitor additional metrics, e.g. disk space: # Edit crontab > crontab -e # Add command to report disk space utilization to CloudWatch every five minutes */5 * * * * <path_to>/mon-put-instance-data.pl --disk-space-util --disk-space-used --disk- space-avail --disk-path=/ --from-cron
  • 53. Logging with CloudWatch Logs { "image": ”nginx:latest", ... "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": ”nginx", "awslogs-region": "us-east-1" } } { • Defined within the task definition • Available log drivers: • awslogs • fluentd • splunk • syslog
  • 54. Challenges running containers at scale Resources and State Management Monitoring Service Discovery Deployment
  • 55. Scheduling Containers: Long Running App •Deploy using least space: minimumHealthyPercent = 50%, maximumPercent = 100% Instance 1 Instance 2 Instance 3 Instance 4 Instance 5 Task 1 Task 2 Task 3 Task 4
  • 56. Scheduling Containers: Long Running App •Deploy using least space: minimumHealthyPercent = 50%, maximumPercent = 100% Instance 1 Instance 2 Instance 3 Instance 4 Instance 5 Task 1 Task 2 Task 3 Task 4
  • 57. Scheduling Containers: Long Running App •Deploy using least space: minimumHealthyPercent = 50%, maximumPercent = 100% Instance 1 Instance 2 Instance 3 Instance 4 Instance 5 Task 1 Task 2 Task 3 Task 4
  • 58. Scheduling Containers: Long Running App •Deploy quickly without reducing service capacity:: minimumHealthyPercent = 100%, maximumPercent = 200% Instance 1 Instance 2 Instance 3 Instance 4 Instance 5 Instance 6 Instance 7 Instance 8 Task 1 Task 2 Task 3 Task 4
  • 59. Scheduling Containers: Long Running App •Deploy quickly without reducing service capacity:: minimumHealthyPercent = 100%, maximumPercent = 200% Instance 1 Instance 2 Instance 3 Instance 4 Instance 5 Instance 6 Instance 7 Instance 8 Task 1 Task 2 Task 3 Task 4 Task 5 Task 6 Task 7 Task 8
  • 60. Scheduling Containers: Long Running App •Deploy quickly without reducing service capacity:: minimumHealthyPercent = 100%, maximumPercent = 200% Instance 1 Instance 2 Instance 3 Instance 4 Instance 5 Instance 6 Instance 7 Instance 8 Task 5 Task 6 Task 7 Task 8
  • 61. Scheduling Containers: Long Running App • Blue-Green Deployments • Define two ECS services • Each service is associated w/ ELB • Both ELBs in Route 53 record set with weighted routing policy, 100% primary, 0% secondary • Deploy to blue or green service and switch weights TASK A TASK B Route53 Record Set With Weighted Routing Policy 100% 0%
  • 62. IAM Roles for Tasks DynamoDB ECS Cluster EC2 Instance EC2 Instance TASK A TASK B TASK B S3 Storage
  • 64. ECS Placement Strategies Binpacking Spread Affinity Distinct Instance
  • 65. Placement: Targeting Instance Type g2.2xlarge t2.small g2.2xlarge g2.2xlarge
  • 66. Placement: Targeting Instance Type & Zone g2.2xlarge t2.small t2.micro t2.medium t2.medium t2.small g2.2xlarge t2.small t2.small t2.medium us-east-1aus-east-1d
  • 67. Placement: Spread across Zone and Binpack g2.2xlarge t2.small t2.micro t2.medium t2.medium t2.small g2.2xlarge t2.small us-east-1aus-east-1d g2.2xlarge t2.medium t2.micro t2.small us-east-1c
  • 68. Placement: Affinity and Anti-Affinity g2.2xlarge t2.small t2.micro t2.medium t2.medium t2.small g2.2xlarge t2.small us-east-1aus-east-1d g2.2xlarge t2.medium t2.micro t2.small us-east-1c
  • 69. Placement: Distinct Instances t2.medium g2.2xlarge t2.micro t2.small t2.small t2.small g2.2xlarge t2.small t2.small t2.small g2.2xlarge t2.small
  • 71. AWS CodeCommit AWS CodePipeline AWS CodeBuild Amazon ECR Amazon ECS instance Spot Instance AWS CloudFormation 1. Commit Code 2. Trigger Pipeline 3.Build Artifact 5. Update Stack 6. Update Service 4. Push Image Reference Architecture
  • 72. New Features! • ECS adds console support for Spot fleet creation • https://aws.amazon.com/about-aws/whats-new/2017/06/amazon-ecs- adds-console-support-for-spot-fleet-creation/ • ECS adds support for time and event based scheduling • https://aws.amazon.com/about-aws/whats-new/2017/06/amazon-ecs-now- supports-time-and-event-based-task-scheduling/