Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Operating ECS in production
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Michael Wittig
April 12, 2018
Technology
74
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Operating ECS in production
https://github.com/widdix/aws-cf-templates
Michael Wittig
April 12, 2018
More Decks by Michael Wittig
See All by Michael Wittig
AWS Cost Optimization 101
michaelwittig
0
110
DVC02 - Cutting-edge architectures based on AWS AppSync, Lambda, and Fargate
michaelwittig
0
120
Review: AWS Global Accelerator - AWS Meetup Stuttgart 2019
michaelwittig
0
480
Rapid Docker on AWS
michaelwittig
0
110
Serverless Workflows with AWS Step Functions
michaelwittig
0
88
Your Lambda function might execute twice. Be prepared! (ServerlessDays Zurich)
michaelwittig
0
82
Cutting-Edge Architectures Based on AppSync, Lambda, and Fargate
michaelwittig
1
560
Your Lambda function might execute twice. Be prepared!
michaelwittig
0
750
Network Security on AWS
michaelwittig
0
97
Other Decks in Technology
See All in Technology
[RSJ26] Flow as Flow: Modeling Robot Velocity Fields as Probability Velocity Fields
keio_smilab
PRO
0
170
Bet AI Day 2026丨Agentは、「金融」という巨大産業の何を変えられるのか
layerx
PRO
0
530
Jetpack Compose で挑む新聞紙面UI ─ 複合ジェスチャー・ポリゴン記事領域・適応的ページ構成という3つの壁/droidkaigi2026
nikkei_engineer_recruiting
0
130
The Django UUID Story - DjangoCon US 2026
pauloxnet
0
380
DMMブックスのNext.js化を加速させるAI活用 / Migrating DMM Books to Next.js with AI
kentarom
1
300
AI駆動開発をチームに根付かせる - 「1行も書かない」チームがHarnessを育てた1年 -
kenichirokimura
6
3.6k
いかに伝えるか 〜新卒エンジニアの教育のための、ライトノベル活用の一例
ikedon
1
150
PM領域でのAI Agentの活用
lycorptech_jp
PRO
0
220
ClaudeCodeでセキュリティ監視業務を半自動化_1年の運用でわかったAIに任せる設計の5つのポイント
kintotechdev
4
1.1k
『自分で判断できるか』を基準に、プロダクトのハンズオン研修でAI利用の線を引いてみた / Where We Drew the Line on AI in Hands-on Training
honyanya
1
790
[DroidKaigi 2026] Making UI specifications visible: Android UI development in the AI agent era supported by Compose Screenshot Testing and galleries
syarihu
0
400
いま好きなこと 最初はそんなに好きじゃなかった #tamagawadev
nishiuma
1
180
Featured
See All Featured
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
440
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
320
Product Roadmaps are Hard
iamctodd
55
13k
4 Signs Your Business is Dying
shpigford
187
23k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
880
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Why Our Code Smells
bkeepers
PRO
340
58k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
Test your architecture with Archunit
thirion
2
2.4k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
430
Transcript
https://github.com/widdix/aws-cf-templates Operating ECS in production
Hello! I am Michael Wittig AWS in Action (2nd ed)
cloudonaut.io AWS Community Hero Independent AWS Consultant Twitter @hellomichibye 2
ECS Orchestrates Docker containers for you Manages Network and per
Task Security 3
ECS Cluster 4 ECS Cluster ECS Instance = EC2 Instance
running ecs-agent ECS optimized AMI ECS Instance ECS Instance
Task Definition 5 ECS Cluster aws ecs run-task \ --count
2 Task Definition Image ... ECS Task 1..N Container ECS Task 1..N Container
ECS Scheduling 6 ECS Cluster ECS Instance ECS Instance ECS
Instance ECS Task 1..N Container ECS Task 1..N Container Placement constraints and strategies
ECS Networking ◎ Public/Private Load Balancer ◎ Elastic Network Interface
(ENI) per task ◦ Public IP ◦ Private IP ◦ Per Task Security Group 7
ECS Service 8 ECS Cluster Task Definition ECS Task ECS
Task ECS Service ◎ Observer ◎ ENI ◎ Load Balancer ◎ Deployment
Operating ECS Challenges 9
1. Spinning up a cluster 10 Demo
Fault Tolerant Auto Scaling Group, Availability Zones 11 Demo
2. Updating a cluster New ECS optimized AMIs are released
frequently! 12
Rolling Update CloudFormation replaces EC2 instances in Auto Scaling Groups
in small batches. 13 Demo
But what about inflight requests? 14
Instance Draining Move all tasks from ECS instance before Instance
is terminated. 15 Demo
Implementing Instance Draining ◎ Auto Scaling Lifecycle hook ◦ Drain
Instance ◦ Wait until drained ◦ Complete Lifecycle hook 16
Tasks are not rescheduled once places! Your last batch of
ECS instances will end up with 0 tasks! 17
3. Scaling a cluster Or adding/removing EC2 instances. 18 Demo
We don’t know how many tasks we can schedule! 19
20 ECS Cluster Available: CPU 100 Memory 200 Available: CPU
100 Memory 200 Available: CPU 100 Memory 200 Available: CPU 300 Memory 600 Task CPU 200 Memory 200
Schedulable Containers 1. Define largest possible task (CPU/memory) 2. For
each instance: a. Calculate how many largest possible tasks would fit b. Report to CloudWatch 3. Scale based on the sum of this metric 21 Credits http://garbe.io/blog/2017/04/12/a-better-solution-to-ecs-autoscaling/
22 ECS Cluster Available: CPU 100 Memory 200 Schedulable 0
Available: CPU 100 Memory 200 Schedulable 0 Available: CPU 100 Memory 200 Schedulable 0 Available: CPU 300 Memory 600 Schedulable 0 Largest Task CPU 200 Memory 200
No CloudWatch Events emitted when task launch failed due to
capacity shortage. 23
4. Public load balancing 24
Public load balancing 25 ECS Cluster ECS Instance ECS Instance
ECS Task 1..N Container ECS Task 1..N Container ECS Task 1..N Container Load Balancer (ALB) ◎ Path based ◎ Host based DNS
5. Internal service discovery / load balancing 26
Internal load balancing 27 ECS Task Frontend LB (internet-facing) ECS
Task ECS Task Catalog (internal) ECS Task ECS Task Shopping card (internal) ECS Task ECS Task DNS DNS DNS
Catalog Catalog Internal Route 53 (with per task ENI) 28
ECS Task Frontend LB (internet-facing) ECS Task ECS Task ECS Task ECS Task ECS Task ECS Task DNS DNS DNS
6. Logging & Monitoring CloudWatch. 29
Credits Special thanks to all the people who made and
released these awesome resources for free: ◎ Presentation template by SlidesCarnival ◎ Photographs by Pexels 30
Thanks! http://bit.ly/amazon-web-services-in-action-2nd-edition https://github.com/widdix/aws-cf-templates https://cloudonaut.io Twitter @hellomichibye Mail
[email protected]
31