SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
Running Docker clusters on AWS
Julien Simon
Principal Technical Evangelist
Amazon Web Services

julsimon@amazon.com
@julsimon

09/11/2016
The problem
Given a certain amount of
processing power and memory, 
how can we best manage
an arbitrary number of apps
running in Docker containers?
http://tidalseven.com
Docker on Amazon Web Services
Amazon EC2 Container Service (ECS)
•  https://aws.amazon.com/ecs/
•  Launched in 04/2015
•  Available in eu-west-1 & eu-central-1
•  No additional charge
Amazon EC2 Container Registry (ECR)
•  https://aws.amazon.com/ecr/
•  Launched in 12/2015
•  Available in eu-west-1 & eu-central-1
•  Free tier: 500MB / month for a year
•  $0.10 / GB / month + outgoing traffic
https://github.com/aws/amazon-ecs-init
https://github.com/aws/amazon-ecs-agent
http://www.allthingsdistributed.com/2015/07/under-the-hood-of-the-amazon-ec2-container-service.html
AWS Partners
https://aws.amazon.com/fr/containers/partners/
Case study: Coursera
https://www.youtube.com/watch?v=a45J6xAGUvA
•  Coursera deliver Massive Open Online Courses (14 million students,
1000+ courses). Their platform runs a large number of batch jobs,
notably to grade programming assignments. Grading jobs need to run in
near-real time while preventing execution of untrusted code inside the
Coursera platform.
•  After trying out some other Docker solutions, Coursera have picked
Amazon ECS and have even written their own scheduler.
•  “Amazon ECS enabled Coursera to focus on releasing new software !
rather than spending time managing clusters” - Frank Chen, Software
Engineer
Case study: Remind
“Moving to Amazon ECS significantly improved
our service performance” Jason Fischl, VP of
Engineering
https://www.youtube.com/watch?v=8zbbQkszP04
•  Messaging platform for
teachers, parents and
students (35M users,
2.5B messages, 50% of
U.S. public schools)
•  Micro-service platform
deployed on Heroku,
migrated to Amazon ECS
(36 nodes in Q4’15)
Case study: Segment
https://aws.amazon.com/fr/solutions/case-studies/segment/
•  Segment provides a service used by businesses to collect customer data for
later use in analytics and marketing.
•  Different micro-services such as API, CDN, and App are deployed on
different Amazon ECS clusters. Each service registers to an ELB and
Amazon Route 53 points a local entry at each ELB. Services can
communicate with each other through DNS.
•  Segment have also built their own PaaS on top of AWS: "
https://segment.com/blog/the-segment-aws-stack/ 
“Switching to Amazon ECS has greatly simplified running a service without
needing to worry about provisioning or availability”"
Calvin French-Owen, Cofounder and CTO
The Amazon ECS CLI in one slide
ecs-cli configure --cluster myCluster --region eu-west-1
ecs-cli up --keypair myKey --capability-iam –size 3 

ecs-cli down myCluster --force
ecs-cli compose service up
ecs-cli compose service ps
ecs-cli compose service scale 8
ecs-cli compose service stop
ecs-cli compose service delete
aws ecs list-clusters
aws ecs describe-clusters --cluster myCluster
aws ecs list-container-instances --cluster myCluster
Homemade tool: ‘ecs-find’ 

https://github.com/juliensimon/aws/blob/master/ecs/ecs-find
https://github.com/aws/amazon-ecs-cli
Managing containers on ECS with the console
Demo #1"
"
Amazon Linux + Amazon ECS"
"
number of web apps (on port 80) = number of nodes in the cluster"
Managing containers on ECS with Rancher
Demo #2"
"
RancherOS + Amazon ECS "
+ Rancher Server"
"
number of web apps (on port 80) = number of nodes in the cluster "
Architecture #1: Fixed ports + ELB
Amazon EC2 Container Service Developer Guide
•  No service discovery,
no service registration:
automation required
•  Don’t use 1 ELB per
service. Use 1 single
ALB instead!
•  Only 1 container
from a given image
per ECS instance
Architecture #2: Fixed ports + LB + DNS 
https://aws.amazon.com/blogs/compute/service-discovery-an-amazon-ecs-reference-architecture/
•  Service registration done in
Route 53 by CloudWatch
Events and Lambda (new
CNAME for the LB)
•  Service discovery with DNS
•  Only 1 container
from a given image
per ECS instance
Architecture #3: Fixed ports + Weave + DNS
https://aws.amazon.com/blogs/apn/architecting-microservices-using-weave-net-and-amazon-ec2-container-service/
•  Service registration done by Weave
•  gossip protocol, no central server
•  IP address only (no port)
•  Service discovery & load balancing
done with DNS
•  LB for Internet-facing services
•  Only 1 container from a given image
per ECS instance
Demo #3 "
"
Amazon Linux + Amazon ECS "
+ Weave"
"
number of web apps (on port 80) = number of nodes in the cluster
ECS agent
R
Registrator
C
Consul agent
F
Fabio
P
Portal
S
Stocks
W
Weather
Architecture #4: Random ports + Consul and friends
Internet
Gateway Load Balancer
Consul server
EC2 instance
R R RC C C
F F F:9999 :9999 :9999
:80
P P P PP P
S
:random
S
:random
S
:random
W
:random
W
:random
:random :random :random:random :random
ECS instance ECS instance ECS instance
IP and port number of service returned by local DNS lookup
Consul traffic
omitted for brevity
and sanity J
ECS
cluster
:53:53:53
:random
https://aws.amazon.com/blogs/compute/service-discovery-via-consul-with-amazon-ecs/ + tweaks ;)
Demo #4 "
Amazon Linux + Amazon ECS "
+ Consul + Registrator + Fabio""
"
number of web apps (on port 80) > number of nodes in the cluster…"
but this is really a complex setup!
Architecture #5: Random ports, much simpler!
•  ECS and the ALB work
hand in hand for
registration and discovery
•  Multiple containers from a
given image
per ECS instance
https://aws.amazon.com/blogs/compute/microservice-delivery-with-amazon-ecs-and-application-load-
balancers/
Demo #5"
"
Amazon Linux + Amazon ECS + ALB"
"
number of web apps (on port 80) > number of nodes in the cluster…"
and the setup doesn’t make your head hurt (too much) "
"
Additional resources
Tech articles by Werner Vogels, CTO, Amazon.com
http://www.allthingsdistributed.com/2014/11/amazon-ec2-container-service.html
http://www.allthingsdistributed.com/2015/04/state-management-and-scheduling-with-ecs.html"
http://www.allthingsdistributed.com/2015/07/under-the-hood-of-the-amazon-ec2-container-service.html
Amazon ECS videos @ AWS re:Invent 2015
Amazon ECS: Distributed Applications at Scale https://www.youtube.com/watch?v=eun8CqGqdk8 
Turbocharge Your Deployment Pipeline with Containers https://www.youtube.com/watch?v=o4w8opVCI-Q 
From Local Docker Development to Production https://www.youtube.com/watch?v=7CZFpHUPqXw

A earlier version of this talk, with a focus on Consul, Registrator & Fabio
https://www.youtube.com/playlist?list=PLJgojBtbsuc37iqrxro5S5DcMwv63vrTl
More sessions
•  7/11, 15:00 Hands-on with AWS IoT
•  8/11, 10:00 A 60-minute tour of AWS Compute
•  9/11, 10:00 Deep Dive: DevOps on AWS
•  9/11, 11:00 Running Docker clusters on AWS 
•  21/11, 11:00 Move fast, build things with AWS
•  22/11, 11:00 Deep Dive: Amazon RDS
Danke sehr!
Julien Simon
Principal Technical Evangelist
Amazon Web Services

julsimon@amazon.com
@julsimon

Contenu connexe

Tendances

Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
Amazon Web Services
 

Tendances (20)

Deep Dive on Amazon Relational Database Service (November 2016)
Deep Dive on Amazon Relational Database Service (November 2016)Deep Dive on Amazon Relational Database Service (November 2016)
Deep Dive on Amazon Relational Database Service (November 2016)
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
 
Advanced Task Scheduling with Amazon ECS (June 2017)
Advanced Task Scheduling with Amazon ECS (June 2017)Advanced Task Scheduling with Amazon ECS (June 2017)
Advanced Task Scheduling with Amazon ECS (June 2017)
 
AWS CloudFormation Best Practices
AWS CloudFormation Best PracticesAWS CloudFormation Best Practices
AWS CloudFormation Best Practices
 
My First Big Data Application
My First Big Data ApplicationMy First Big Data Application
My First Big Data Application
 
Secure Content Delivery with AWS
Secure Content Delivery with AWSSecure Content Delivery with AWS
Secure Content Delivery with AWS
 
Advanced Task Scheduling with Amazon ECS
Advanced Task Scheduling with Amazon ECSAdvanced Task Scheduling with Amazon ECS
Advanced Task Scheduling with Amazon ECS
 
Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
 
Masterclass Webinar - AWS CloudFormation
Masterclass Webinar - AWS CloudFormationMasterclass Webinar - AWS CloudFormation
Masterclass Webinar - AWS CloudFormation
 
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and ToolsDeployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
 
Building Serverless APIs (January 2017)
Building Serverless APIs (January 2017)Building Serverless APIs (January 2017)
Building Serverless APIs (January 2017)
 
AWS CloudFormation and Puppet at PuppetConf - Jinesh Varia
AWS CloudFormation and Puppet at PuppetConf - Jinesh VariaAWS CloudFormation and Puppet at PuppetConf - Jinesh Varia
AWS CloudFormation and Puppet at PuppetConf - Jinesh Varia
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
 
An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)
 
AWS Infrastructure as Code - September 2016 Webinar Series
AWS Infrastructure as Code - September 2016 Webinar SeriesAWS Infrastructure as Code - September 2016 Webinar Series
AWS Infrastructure as Code - September 2016 Webinar Series
 
Architecting for Resiliency
Architecting for ResiliencyArchitecting for Resiliency
Architecting for Resiliency
 
Infrastructure as code with Amazon Web Services
Infrastructure as code with Amazon Web ServicesInfrastructure as code with Amazon Web Services
Infrastructure as code with Amazon Web Services
 
VMware and AWS together (June 2017)
VMware and AWS together (June 2017)VMware and AWS together (June 2017)
VMware and AWS together (June 2017)
 
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWSAWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
 

Similaire à Running Docker clusters on AWS (November 2016)

Similaire à Running Docker clusters on AWS (November 2016) (20)

Amazon ECS (March 2016)
Amazon ECS (March 2016)Amazon ECS (March 2016)
Amazon ECS (March 2016)
 
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
Docker on AWS with Amazon ECR & ECS - Pop-up Loft Tel Aviv
 
Docker clusters on AWS with Amazon ECS and Kubernetes
Docker clusters on AWS with Amazon ECS and KubernetesDocker clusters on AWS with Amazon ECS and Kubernetes
Docker clusters on AWS with Amazon ECS and Kubernetes
 
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
 
Amazon ECS (December 2015)
Amazon ECS (December 2015)Amazon ECS (December 2015)
Amazon ECS (December 2015)
 
AWS re:Invent 2016: Service Integration Delivery and Automation Using Amazon ...
AWS re:Invent 2016: Service Integration Delivery and Automation Using Amazon ...AWS re:Invent 2016: Service Integration Delivery and Automation Using Amazon ...
AWS re:Invent 2016: Service Integration Delivery and Automation Using Amazon ...
 
Running Docker clusters on AWS (June 2016)
Running Docker clusters on AWS (June 2016)Running Docker clusters on AWS (June 2016)
Running Docker clusters on AWS (June 2016)
 
應用開發新思維
應用開發新思維應用開發新思維
應用開發新思維
 
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
 
Advanced Scheduling with Amazon ECS (September 2017)
Advanced Scheduling with Amazon ECS (September 2017)Advanced Scheduling with Amazon ECS (September 2017)
Advanced Scheduling with Amazon ECS (September 2017)
 
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul MaddoxAWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
 
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
 
Paris Container Day 2016 : Running docker clusters on AWS (Amazon Web Services)
Paris Container Day 2016 : Running docker clusters on AWS (Amazon Web Services)Paris Container Day 2016 : Running docker clusters on AWS (Amazon Web Services)
Paris Container Day 2016 : Running docker clusters on AWS (Amazon Web Services)
 
Containers Meetup (AWS+CNCF) Milano Jan 15th 2020
Containers Meetup (AWS+CNCF) Milano Jan 15th 2020Containers Meetup (AWS+CNCF) Milano Jan 15th 2020
Containers Meetup (AWS+CNCF) Milano Jan 15th 2020
 
Deep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep DiveDeep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep Dive
 
Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...
Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...
Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...
 
Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...
Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...
Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...
 
AWS Elastic Beanstalk - Running Microservices and Docker
AWS Elastic Beanstalk - Running Microservices and DockerAWS Elastic Beanstalk - Running Microservices and Docker
AWS Elastic Beanstalk - Running Microservices and Docker
 
From Docker Straight to AWS
From Docker Straight to AWSFrom Docker Straight to AWS
From Docker Straight to AWS
 
Introduction to Container Management on AWS
Introduction to Container Management on AWSIntroduction to Container Management on AWS
Introduction to Container Management on AWS
 

Plus de Julien SIMON

Plus de Julien SIMON (20)

An introduction to computer vision with Hugging Face
An introduction to computer vision with Hugging FaceAn introduction to computer vision with Hugging Face
An introduction to computer vision with Hugging Face
 
Reinventing Deep Learning
 with Hugging Face Transformers
Reinventing Deep Learning
 with Hugging Face TransformersReinventing Deep Learning
 with Hugging Face Transformers
Reinventing Deep Learning
 with Hugging Face Transformers
 
Building NLP applications with Transformers
Building NLP applications with TransformersBuilding NLP applications with Transformers
Building NLP applications with Transformers
 
Building Machine Learning Models Automatically (June 2020)
Building Machine Learning Models Automatically (June 2020)Building Machine Learning Models Automatically (June 2020)
Building Machine Learning Models Automatically (June 2020)
 
Starting your AI/ML project right (May 2020)
Starting your AI/ML project right (May 2020)Starting your AI/ML project right (May 2020)
Starting your AI/ML project right (May 2020)
 
Scale Machine Learning from zero to millions of users (April 2020)
Scale Machine Learning from zero to millions of users (April 2020)Scale Machine Learning from zero to millions of users (April 2020)
Scale Machine Learning from zero to millions of users (April 2020)
 
An Introduction to Generative Adversarial Networks (April 2020)
An Introduction to Generative Adversarial Networks (April 2020)An Introduction to Generative Adversarial Networks (April 2020)
An Introduction to Generative Adversarial Networks (April 2020)
 
AIM410R1 Deep learning applications with TensorFlow, featuring Fannie Mae (De...
AIM410R1 Deep learning applications with TensorFlow, featuring Fannie Mae (De...AIM410R1 Deep learning applications with TensorFlow, featuring Fannie Mae (De...
AIM410R1 Deep learning applications with TensorFlow, featuring Fannie Mae (De...
 
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
 
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
 
A pragmatic introduction to natural language processing models (October 2019)
A pragmatic introduction to natural language processing models (October 2019)A pragmatic introduction to natural language processing models (October 2019)
A pragmatic introduction to natural language processing models (October 2019)
 
Building smart applications with AWS AI services (October 2019)
Building smart applications with AWS AI services (October 2019)Building smart applications with AWS AI services (October 2019)
Building smart applications with AWS AI services (October 2019)
 
Build, train and deploy ML models with SageMaker (October 2019)
Build, train and deploy ML models with SageMaker (October 2019)Build, train and deploy ML models with SageMaker (October 2019)
Build, train and deploy ML models with SageMaker (October 2019)
 
The Future of AI (September 2019)
The Future of AI (September 2019)The Future of AI (September 2019)
The Future of AI (September 2019)
 
Building Machine Learning Inference Pipelines at Scale (July 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)Building Machine Learning Inference Pipelines at Scale (July 2019)
Building Machine Learning Inference Pipelines at Scale (July 2019)
 
Train and Deploy Machine Learning Workloads with AWS Container Services (July...
Train and Deploy Machine Learning Workloads with AWS Container Services (July...Train and Deploy Machine Learning Workloads with AWS Container Services (July...
Train and Deploy Machine Learning Workloads with AWS Container Services (July...
 
Optimize your Machine Learning Workloads on AWS (July 2019)
Optimize your Machine Learning Workloads on AWS (July 2019)Optimize your Machine Learning Workloads on AWS (July 2019)
Optimize your Machine Learning Workloads on AWS (July 2019)
 
Deep Learning on Amazon Sagemaker (July 2019)
Deep Learning on Amazon Sagemaker (July 2019)Deep Learning on Amazon Sagemaker (July 2019)
Deep Learning on Amazon Sagemaker (July 2019)
 
Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)Automate your Amazon SageMaker Workflows (July 2019)
Automate your Amazon SageMaker Workflows (July 2019)
 
Build, train and deploy ML models with Amazon SageMaker (May 2019)
Build, train and deploy ML models with Amazon SageMaker (May 2019)Build, train and deploy ML models with Amazon SageMaker (May 2019)
Build, train and deploy ML models with Amazon SageMaker (May 2019)
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Running Docker clusters on AWS (November 2016)

  • 1. Running Docker clusters on AWS Julien Simon Principal Technical Evangelist Amazon Web Services julsimon@amazon.com @julsimon 09/11/2016
  • 2. The problem Given a certain amount of processing power and memory, how can we best manage an arbitrary number of apps running in Docker containers? http://tidalseven.com
  • 3. Docker on Amazon Web Services Amazon EC2 Container Service (ECS) •  https://aws.amazon.com/ecs/ •  Launched in 04/2015 •  Available in eu-west-1 & eu-central-1 •  No additional charge Amazon EC2 Container Registry (ECR) •  https://aws.amazon.com/ecr/ •  Launched in 12/2015 •  Available in eu-west-1 & eu-central-1 •  Free tier: 500MB / month for a year •  $0.10 / GB / month + outgoing traffic
  • 6. Case study: Coursera https://www.youtube.com/watch?v=a45J6xAGUvA •  Coursera deliver Massive Open Online Courses (14 million students, 1000+ courses). Their platform runs a large number of batch jobs, notably to grade programming assignments. Grading jobs need to run in near-real time while preventing execution of untrusted code inside the Coursera platform. •  After trying out some other Docker solutions, Coursera have picked Amazon ECS and have even written their own scheduler. •  “Amazon ECS enabled Coursera to focus on releasing new software ! rather than spending time managing clusters” - Frank Chen, Software Engineer
  • 7. Case study: Remind “Moving to Amazon ECS significantly improved our service performance” Jason Fischl, VP of Engineering https://www.youtube.com/watch?v=8zbbQkszP04 •  Messaging platform for teachers, parents and students (35M users, 2.5B messages, 50% of U.S. public schools) •  Micro-service platform deployed on Heroku, migrated to Amazon ECS (36 nodes in Q4’15)
  • 8. Case study: Segment https://aws.amazon.com/fr/solutions/case-studies/segment/ •  Segment provides a service used by businesses to collect customer data for later use in analytics and marketing. •  Different micro-services such as API, CDN, and App are deployed on different Amazon ECS clusters. Each service registers to an ELB and Amazon Route 53 points a local entry at each ELB. Services can communicate with each other through DNS. •  Segment have also built their own PaaS on top of AWS: " https://segment.com/blog/the-segment-aws-stack/ “Switching to Amazon ECS has greatly simplified running a service without needing to worry about provisioning or availability”" Calvin French-Owen, Cofounder and CTO
  • 9. The Amazon ECS CLI in one slide ecs-cli configure --cluster myCluster --region eu-west-1 ecs-cli up --keypair myKey --capability-iam –size 3 
 ecs-cli down myCluster --force ecs-cli compose service up ecs-cli compose service ps ecs-cli compose service scale 8 ecs-cli compose service stop ecs-cli compose service delete aws ecs list-clusters aws ecs describe-clusters --cluster myCluster aws ecs list-container-instances --cluster myCluster Homemade tool: ‘ecs-find’ 
 https://github.com/juliensimon/aws/blob/master/ecs/ecs-find https://github.com/aws/amazon-ecs-cli
  • 10. Managing containers on ECS with the console
  • 11. Demo #1" " Amazon Linux + Amazon ECS" " number of web apps (on port 80) = number of nodes in the cluster"
  • 12. Managing containers on ECS with Rancher
  • 13. Demo #2" " RancherOS + Amazon ECS " + Rancher Server" " number of web apps (on port 80) = number of nodes in the cluster "
  • 14. Architecture #1: Fixed ports + ELB Amazon EC2 Container Service Developer Guide •  No service discovery, no service registration: automation required •  Don’t use 1 ELB per service. Use 1 single ALB instead! •  Only 1 container from a given image per ECS instance
  • 15. Architecture #2: Fixed ports + LB + DNS https://aws.amazon.com/blogs/compute/service-discovery-an-amazon-ecs-reference-architecture/ •  Service registration done in Route 53 by CloudWatch Events and Lambda (new CNAME for the LB) •  Service discovery with DNS •  Only 1 container from a given image per ECS instance
  • 16. Architecture #3: Fixed ports + Weave + DNS https://aws.amazon.com/blogs/apn/architecting-microservices-using-weave-net-and-amazon-ec2-container-service/ •  Service registration done by Weave •  gossip protocol, no central server •  IP address only (no port) •  Service discovery & load balancing done with DNS •  LB for Internet-facing services •  Only 1 container from a given image per ECS instance
  • 17. Demo #3 " " Amazon Linux + Amazon ECS " + Weave" " number of web apps (on port 80) = number of nodes in the cluster
  • 18. ECS agent R Registrator C Consul agent F Fabio P Portal S Stocks W Weather Architecture #4: Random ports + Consul and friends Internet Gateway Load Balancer Consul server EC2 instance R R RC C C F F F:9999 :9999 :9999 :80 P P P PP P S :random S :random S :random W :random W :random :random :random :random:random :random ECS instance ECS instance ECS instance IP and port number of service returned by local DNS lookup Consul traffic omitted for brevity and sanity J ECS cluster :53:53:53 :random https://aws.amazon.com/blogs/compute/service-discovery-via-consul-with-amazon-ecs/ + tweaks ;)
  • 19. Demo #4 " Amazon Linux + Amazon ECS " + Consul + Registrator + Fabio"" " number of web apps (on port 80) > number of nodes in the cluster…" but this is really a complex setup!
  • 20. Architecture #5: Random ports, much simpler! •  ECS and the ALB work hand in hand for registration and discovery •  Multiple containers from a given image per ECS instance https://aws.amazon.com/blogs/compute/microservice-delivery-with-amazon-ecs-and-application-load- balancers/
  • 21. Demo #5" " Amazon Linux + Amazon ECS + ALB" " number of web apps (on port 80) > number of nodes in the cluster…" and the setup doesn’t make your head hurt (too much) " "
  • 22. Additional resources Tech articles by Werner Vogels, CTO, Amazon.com http://www.allthingsdistributed.com/2014/11/amazon-ec2-container-service.html http://www.allthingsdistributed.com/2015/04/state-management-and-scheduling-with-ecs.html" http://www.allthingsdistributed.com/2015/07/under-the-hood-of-the-amazon-ec2-container-service.html Amazon ECS videos @ AWS re:Invent 2015 Amazon ECS: Distributed Applications at Scale https://www.youtube.com/watch?v=eun8CqGqdk8 Turbocharge Your Deployment Pipeline with Containers https://www.youtube.com/watch?v=o4w8opVCI-Q From Local Docker Development to Production https://www.youtube.com/watch?v=7CZFpHUPqXw A earlier version of this talk, with a focus on Consul, Registrator & Fabio https://www.youtube.com/playlist?list=PLJgojBtbsuc37iqrxro5S5DcMwv63vrTl
  • 23. More sessions •  7/11, 15:00 Hands-on with AWS IoT •  8/11, 10:00 A 60-minute tour of AWS Compute •  9/11, 10:00 Deep Dive: DevOps on AWS •  9/11, 11:00 Running Docker clusters on AWS •  21/11, 11:00 Move fast, build things with AWS •  22/11, 11:00 Deep Dive: Amazon RDS
  • 24. Danke sehr! Julien Simon Principal Technical Evangelist Amazon Web Services julsimon@amazon.com @julsimon