SlideShare une entreprise Scribd logo
1  sur  15
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
呂昭寬(Cliff)
104首席技術顧問 / AWS台灣Community Hero
EC2 Spot 在104 的深度實踐
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
EC2 Spot 在 104 的深度實踐
Spot Instance 為何
設計上的改變
費用比較
近期變動
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Spot Instance
Amazon EC2 Spot 執行個體是 AWS 雲端中的備用運算容量,可提供相對於隨需價格
更高的折扣。EC2 Spot 執行個體可優化 AWS 雲端成本,您可以相同的預算將應用程式的輸
送量擴展高達 10 倍。您只需在啟動 EC2 執行個體時選擇 Spot,就能將成本降到隨需價格
的十分之一。
隨需執行個體與 Spot 執行個體的唯一差異是,當 EC2 需要收回容量時,EC2 只需在
前 2 分鐘前通知即可中斷 Spot 執行個體。EC2 Spot 執行個體可運用在各種容錯和彈性應用
程式,像是測試與開發環境、無狀態 Web 伺服器、影像轉譯、影片轉碼,以及執行分析、
機器學習及高效能運算 (HPC) 工作負載。EC2 Spot 執行個體與 EMR、Auto Scaling、
Elastic Container Service (ECS)、CloudFormation、Data Pipeline 及 AWS Batch 等其他
AWS 服務緊密整合,可讓您自由選擇如何啟動和維護 Spot 執行個體上執行的應用程式。
AWS 還提供可自動管理 Spot 執行個體的 Spot 叢集。您只需告知 Spot 叢集需要多少
容量,叢集就會處理其餘的部分。
https://aws.amazon.com/tw/ec2/spot/
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Spot Instance使用須知
• 運算中斷
• 冪等性 (Idempotency)
• 非同步調用:排程
• 同步調用: 重試
• 長時間運算: 儲存狀態
• 出價金額
• Auto Scaling :: Launch Configurations
• Spot Fleet / EC2 Fleet
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
應用程式特性
• 每月 4-10M 次請求
• 明顯的淡旺季、週週期
• 每日 Peak / Trough: 5-10x
• 可快取
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
雙 Auto Scaling Group
ECS CPU %Reservation0 100
Spot
On demand
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Usage
2017/08 2017/09 2017/10 2017/11 2017/12 2018/01 2018/02 2018/03 2018/04 2018/05
od-qty spot-qty
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
費用節省
30
40
50
60
70
80
90
100
2017/08 2017/09 2017/10 2017/11 2017/12 2018/01 2018/02 2018/03 2018/04 2018/05
spot-pct
% Saving (OD)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
利用率 …… !!??
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
改進
• 解耦
• 提升各 Task 行為的一致性
• 更容易選擇 Task Scaling 調控參數
• EC2 Fleet
• 簡化 Spot / On-Demand 調度
• Fargate
• 一站式服務
• 省卻管理 EC2 的麻煩
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
改進: EC2 Fleet
https://aws.amazon.com/blogs/aws/ec2-fleet-manage-thousands-of-on-demand-and-spot-instances-with-one-request/
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Take Home Message
1. EC2 Spot 費用划算;搭配 EC2 Fleet 易學易用
但要對運算中斷做好準備
2. Managed Service 未必較貴,但肯定省麻煩
3. 歡迎加入 AWS User Group Taiwan (fb: awsugtw)
記得參加我們攤位的挑戰!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank You!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
0
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
0xDEADBEEF

Contenu connexe

Similaire à EC2 Spot in 104

20231027-轉型浪潮下 重新定義客戶體驗解決方案-CIO商業科技服務論壇.pptx
20231027-轉型浪潮下 重新定義客戶體驗解決方案-CIO商業科技服務論壇.pptx20231027-轉型浪潮下 重新定義客戶體驗解決方案-CIO商業科技服務論壇.pptx
20231027-轉型浪潮下 重新定義客戶體驗解決方案-CIO商業科技服務論壇.pptx
ssuser293781
 
Track 2 Session 2_ 電商平台的資安維運與成本管理
Track 2 Session 2_ 電商平台的資安維運與成本管理Track 2 Session 2_ 電商平台的資安維運與成本管理
Track 2 Session 2_ 電商平台的資安維運與成本管理
Amazon Web Services
 

Similaire à EC2 Spot in 104 (20)

Media State of the Union
Media State of the UnionMedia State of the Union
Media State of the Union
 
AWS Summit: Strikingly analytics
AWS Summit:  Strikingly analyticsAWS Summit:  Strikingly analytics
AWS Summit: Strikingly analytics
 
如何利用 Amazon EMR 及Athena 打造高成本效益的大數據環境
如何利用 Amazon EMR 及Athena 打造高成本效益的大數據環境如何利用 Amazon EMR 及Athena 打造高成本效益的大數據環境
如何利用 Amazon EMR 及Athena 打造高成本效益的大數據環境
 
20231027-轉型浪潮下 重新定義客戶體驗解決方案-CIO商業科技服務論壇.pptx
20231027-轉型浪潮下 重新定義客戶體驗解決方案-CIO商業科技服務論壇.pptx20231027-轉型浪潮下 重新定義客戶體驗解決方案-CIO商業科技服務論壇.pptx
20231027-轉型浪潮下 重新定義客戶體驗解決方案-CIO商業科技服務論壇.pptx
 
01-aws-雲端服務介紹與案例分享-justine-peng.pdf
01-aws-雲端服務介紹與案例分享-justine-peng.pdf01-aws-雲端服務介紹與案例分享-justine-peng.pdf
01-aws-雲端服務介紹與案例分享-justine-peng.pdf
 
Severless 雲端架構拆解,新創商業模式的雲端演化史 - 天氣即時預報 on AWS.pdf
Severless 雲端架構拆解,新創商業模式的雲端演化史 - 天氣即時預報 on AWS.pdfSeverless 雲端架構拆解,新創商業模式的雲端演化史 - 天氣即時預報 on AWS.pdf
Severless 雲端架構拆解,新創商業模式的雲端演化史 - 天氣即時預報 on AWS.pdf
 
AWS re:Invent Recap 2016 Taiwan part 1
AWS re:Invent Recap 2016 Taiwan part 1AWS re:Invent Recap 2016 Taiwan part 1
AWS re:Invent Recap 2016 Taiwan part 1
 
使用Amazon Machine Learning 創建智能應用程式
使用Amazon Machine Learning 創建智能應用程式使用Amazon Machine Learning 創建智能應用程式
使用Amazon Machine Learning 創建智能應用程式
 
Innovation & Go Global with AWS
Innovation & Go Global with AWSInnovation & Go Global with AWS
Innovation & Go Global with AWS
 
深入淺出 AWS 大數據工具
深入淺出 AWS 大數據工具深入淺出 AWS 大數據工具
深入淺出 AWS 大數據工具
 
客戶常見問題分享與解決
客戶常見問題分享與解決客戶常見問題分享與解決
客戶常見問題分享與解決
 
2022/04 - AWS雲端解決方案及軟體開發歷程
2022/04 - AWS雲端解決方案及軟體開發歷程2022/04 - AWS雲端解決方案及軟體開發歷程
2022/04 - AWS雲端解決方案及軟體開發歷程
 
2022/09 - AWS雲端解決方案及軟體開發歷程
2022/09 - AWS雲端解決方案及軟體開發歷程2022/09 - AWS雲端解決方案及軟體開發歷程
2022/09 - AWS雲端解決方案及軟體開發歷程
 
2021 二月 Kasten K10 介紹與概觀
2021 二月 Kasten K10 介紹與概觀2021 二月 Kasten K10 介紹與概觀
2021 二月 Kasten K10 介紹與概觀
 
CKmates - AWS 三大 AI 解決方案:應用影像辨識、聊天機器人與語音轉換以及 Serverless 應用
CKmates - AWS 三大 AI 解決方案:應用影像辨識、聊天機器人與語音轉換以及 Serverless 應用CKmates - AWS 三大 AI 解決方案:應用影像辨識、聊天機器人與語音轉換以及 Serverless 應用
CKmates - AWS 三大 AI 解決方案:應用影像辨識、聊天機器人與語音轉換以及 Serverless 應用
 
CKmates - AWS 雲端運算 基礎服務介紹
CKmates - AWS 雲端運算 基礎服務介紹CKmates - AWS 雲端運算 基礎服務介紹
CKmates - AWS 雲端運算 基礎服務介紹
 
Track 2 Session 2_ 電商平台的資安維運與成本管理
Track 2 Session 2_ 電商平台的資安維運與成本管理Track 2 Session 2_ 電商平台的資安維運與成本管理
Track 2 Session 2_ 電商平台的資安維運與成本管理
 
2020 AWS Summit - 如何有效管理 AWS 的成本結構與系統架構
2020 AWS Summit - 如何有效管理 AWS 的成本結構與系統架構2020 AWS Summit - 如何有效管理 AWS 的成本結構與系統架構
2020 AWS Summit - 如何有效管理 AWS 的成本結構與系統架構
 
2020 CloudEege Summit 用Serverless真的方便又省錢?
2020 CloudEege Summit 用Serverless真的方便又省錢?2020 CloudEege Summit 用Serverless真的方便又省錢?
2020 CloudEege Summit 用Serverless真的方便又省錢?
 
2022/03 - 新創企業的AWS雲端解決方案及軟體開發歷程
2022/03 - 新創企業的AWS雲端解決方案及軟體開發歷程2022/03 - 新創企業的AWS雲端解決方案及軟體開發歷程
2022/03 - 新創企業的AWS雲端解決方案及軟體開發歷程
 

Plus de Cliff Chao-kuan Lu

Plus de Cliff Chao-kuan Lu (14)

Serverless 網站監控
Serverless 網站監控Serverless 網站監控
Serverless 網站監控
 
Lessons Learnt from Guanyu
Lessons Learnt from GuanyuLessons Learnt from Guanyu
Lessons Learnt from Guanyu
 
Serverless Patterns
Serverless PatternsServerless Patterns
Serverless Patterns
 
Greetings from AWS User Group Taiwan
Greetings from AWS User Group TaiwanGreetings from AWS User Group Taiwan
Greetings from AWS User Group Taiwan
 
104 meets cloud
104 meets cloud104 meets cloud
104 meets cloud
 
Intro to Serverless
Intro to ServerlessIntro to Serverless
Intro to Serverless
 
Interview Quiz w/o Server
Interview Quiz w/o ServerInterview Quiz w/o Server
Interview Quiz w/o Server
 
那些 re:Invent 不怎麼技術的事
那些 re:Invent 不怎麼技術的事那些 re:Invent 不怎麼技術的事
那些 re:Invent 不怎麼技術的事
 
Cost Optimization Best Practices from Trend Micro
Cost Optimization Best Practices from Trend Micro Cost Optimization Best Practices from Trend Micro
Cost Optimization Best Practices from Trend Micro
 
不談 IAM
不談 IAM不談 IAM
不談 IAM
 
Networking in the cloud
Networking in the cloudNetworking in the cloud
Networking in the cloud
 
Health, Platform, In The Cloud
Health, Platform, In The CloudHealth, Platform, In The Cloud
Health, Platform, In The Cloud
 
AWS Solutions Architect 準備心得
AWS Solutions Architect 準備心得AWS Solutions Architect 準備心得
AWS Solutions Architect 準備心得
 
無障礙網頁
無障礙網頁無障礙網頁
無障礙網頁
 

EC2 Spot in 104

  • 1. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 呂昭寬(Cliff) 104首席技術顧問 / AWS台灣Community Hero EC2 Spot 在104 的深度實踐
  • 2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. EC2 Spot 在 104 的深度實踐 Spot Instance 為何 設計上的改變 費用比較 近期變動
  • 3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Spot Instance Amazon EC2 Spot 執行個體是 AWS 雲端中的備用運算容量,可提供相對於隨需價格 更高的折扣。EC2 Spot 執行個體可優化 AWS 雲端成本,您可以相同的預算將應用程式的輸 送量擴展高達 10 倍。您只需在啟動 EC2 執行個體時選擇 Spot,就能將成本降到隨需價格 的十分之一。 隨需執行個體與 Spot 執行個體的唯一差異是,當 EC2 需要收回容量時,EC2 只需在 前 2 分鐘前通知即可中斷 Spot 執行個體。EC2 Spot 執行個體可運用在各種容錯和彈性應用 程式,像是測試與開發環境、無狀態 Web 伺服器、影像轉譯、影片轉碼,以及執行分析、 機器學習及高效能運算 (HPC) 工作負載。EC2 Spot 執行個體與 EMR、Auto Scaling、 Elastic Container Service (ECS)、CloudFormation、Data Pipeline 及 AWS Batch 等其他 AWS 服務緊密整合,可讓您自由選擇如何啟動和維護 Spot 執行個體上執行的應用程式。 AWS 還提供可自動管理 Spot 執行個體的 Spot 叢集。您只需告知 Spot 叢集需要多少 容量,叢集就會處理其餘的部分。 https://aws.amazon.com/tw/ec2/spot/
  • 4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Spot Instance使用須知 • 運算中斷 • 冪等性 (Idempotency) • 非同步調用:排程 • 同步調用: 重試 • 長時間運算: 儲存狀態 • 出價金額 • Auto Scaling :: Launch Configurations • Spot Fleet / EC2 Fleet
  • 5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 應用程式特性 • 每月 4-10M 次請求 • 明顯的淡旺季、週週期 • 每日 Peak / Trough: 5-10x • 可快取
  • 6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 雙 Auto Scaling Group ECS CPU %Reservation0 100 Spot On demand
  • 7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Usage 2017/08 2017/09 2017/10 2017/11 2017/12 2018/01 2018/02 2018/03 2018/04 2018/05 od-qty spot-qty
  • 8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 費用節省 30 40 50 60 70 80 90 100 2017/08 2017/09 2017/10 2017/11 2017/12 2018/01 2018/02 2018/03 2018/04 2018/05 spot-pct % Saving (OD)
  • 9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 利用率 …… !!??
  • 10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 改進 • 解耦 • 提升各 Task 行為的一致性 • 更容易選擇 Task Scaling 調控參數 • EC2 Fleet • 簡化 Spot / On-Demand 調度 • Fargate • 一站式服務 • 省卻管理 EC2 的麻煩
  • 11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 改進: EC2 Fleet https://aws.amazon.com/blogs/aws/ec2-fleet-manage-thousands-of-on-demand-and-spot-instances-with-one-request/
  • 12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Take Home Message 1. EC2 Spot 費用划算;搭配 EC2 Fleet 易學易用 但要對運算中斷做好準備 2. Managed Service 未必較貴,但肯定省麻煩 3. 歡迎加入 AWS User Group Taiwan (fb: awsugtw) 記得參加我們攤位的挑戰!
  • 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank You!
  • 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 0
  • 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 0xDEADBEEF

Notes de l'éditeur

  1. 運算中斷: 正常 Server 也會發生
  2. 2016 年開發 使用 ECS ,靠應用層參數進行 Auto Scaling
  3. 4-10M requests / mo
  4. EC2 Fleet: 強化原本 Spot Fleet,5/2 推出 Fargate 比起 ECS / EC2 較貴,但不用預留 task 成長的 buffer
  5. 6/26 因 Spot out-bid 引入