狠狠撸

狠狠撸Share a Scribd company logo
山中 純
四国クラウドお遍路 2020
2020/11/07
1
山中 純 (やまなか じゅん) @junkitch (facebook)
? Weekday
? メーカー(滋賀県)勤務、新規事業向けシステム開発(なんでも屋)
? 昨年度からクラウド(AWS)チーム所属、社内クラウドベンダー
? Holiday
? 技術大好きプログラマー (AWSは2013年~) : 現在6冠
? 学生バックパッカー…ただいま大学6年生(ぇ
2
1. Auto Scalingのしくみは知っていても、いざ設定しようとすると詰
まることが多い
2. FargateサービスのAuto Scalingは単純にEC2のAuto Scalingの置き
換えでできないこともある
3. 困ったらサポートに聞くのが一番
(だけど、解決しないこともある…)
3
?やりたいこと(システム要件)
? RDSのデータを読み込んで、データ分析して結果をS3に保存
? 1件30分かかるデータ分析ジョブを、毎日24:00~5:00の5時間に400件(お客さんの
数だけ)分析
4
? 問題
? SQSのCloudWatchメトリクスに
「すべてのメッセージの数」がない
? 解決策
? Metric Mathを使えばOK!
? 「キューメッセージの総数=処理中の
メッセージの数+キューから取得可能
なメッセージの数」という新しいメ
トリクスを定義して、Auto Scaling
の監視メトリクスに使用できる
5
? 問題
? ジョブを処理してキューのメッセー
ジ数が少なくなるにつれて、処理中
のEC2が終了してしまう
? 解決策
? EC2のAuto Scalingの「インスタン
スのスケールイン保護」機能を活
用!
? (注意)アプリケーションから直接イン
スタンスを終了すると、Auto
Scalingが期待通りのふるまいをしな
いことがある (希望する台数を0に設
定できず、延々とインスタンスの起
動と終了を繰り返す現象が発生する)
6
? 問題
? FargateのサービスのAuto Scaling
に置き換えようとしたところ、ス
テップスケーリングでは「スケール
イン保護」が選べない
? 解決策
? サポートに問い合わせたところ、無
理なんであきらめてくれ(意訳)と言
われた。
解決策を求む…。
7
1. Metric Mathを使えば、直接取得できないCloudWatchメトリクスを
計算できる
2. ジョブ実行中のインスタンスがスケールインされないよう「スケー
ルイン保護」を使うとよい
3. FargateのサービスのAuto Scalingでステップスケーリングを使う場
合に「スケールイン保護」が選べないのはやむなし
8
Ad

Recommended

AWS Black Belt Techシリーズ Amazon CloudWatch & Auto Scaling
AWS Black Belt Techシリーズ Amazon CloudWatch & Auto Scaling
Amazon Web Services Japan
?
Amazon EC2 HPCインスタンス - AWSマイスターシリーズ
Amazon EC2 HPCインスタンス - AWSマイスターシリーズ
Amazon Web Services Japan
?
AWS Black Belt Online Seminar 2017 Auto Scaling
AWS Black Belt Online Seminar 2017 Auto Scaling
Amazon Web Services Japan
?
Aws st 20130617-auto_scaling
Aws st 20130617-auto_scaling
Makoto Uehara
?
肠濒辞耻诲辫补肠办导入资料(2011/05/06版)
肠濒辞耻诲辫补肠办导入资料(2011/05/06版)
iret, Inc.
?
CloudWatch Eventsを使った ECSのAutoScaling
CloudWatch Eventsを使った ECSのAutoScaling
淳 千葉
?
20180313 Amazon Container Services アップデート
20180313 Amazon Container Services アップデート
Amazon Web Services Japan
?
AWSクラウドデザインパターン VPC移行編
AWSクラウドデザインパターン VPC移行編
Yasuhiro Araki, Ph.D
?
2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
?
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
?
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
?
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
?
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
?
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
?
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
?
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
?
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
?
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
?
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
?
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
?
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
?
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
?
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
?
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
?
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
?
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
?
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
?
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
?

More Related Content

Featured (20)

2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
?
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
?
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
?
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
?
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
?
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
?
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
?
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
?
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
?
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
?
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
?
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
?
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
?
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
?
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
?
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
?
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
?
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
?
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
?
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
?
2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
?
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
?
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
?
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
?
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
?
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
?
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
?
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
?
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
?
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
?
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
?
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
?
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
?
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
?
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
?
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
?

20201107 四国クラウドお遍路 2020 LT

Editor's Notes

  • #5: Auto Scalingを使った実装イメージ 400件の分析ジョブを、SQSにキューイング キューのメッセージ数に応じてAuto ScalingでEC2を起動 Auto Scalingのスケーリングポリシーはステップスケーリングを使用 単純計算で40台ぐらいEC2を動かす必要がある