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
concurrencyで爆速並列デプロイ
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
hedgehog051
December 14, 2022
Technology
1.9k
1
Share
concurrencyで爆速並列デプロイ
CDKのconcurrencyオプションによる並列デプロイについて
hedgehog051
December 14, 2022
More Decks by hedgehog051
See All by hedgehog051
AWS Generative AI CDK Constructsについて
hedgehog051
3
330
KnowledgeBasesとAgentsの紹介
hedgehog051
4
1.9k
BedrockUpdatesPost-GW Summary
hedgehog051
4
950
来てくれClaude 3! Agents for Amazon Bedrockのモデル比較或いはチューニングの話
hedgehog051
5
1.8k
Relic_Tech_Camp_GenerativeAI.pdf
hedgehog051
12
89k
AWSにおけるデータ分析入門 / Introduction To Data Analytics In AWS
hedgehog051
0
250
AWS App Runnerについてとこれから期待したいこと/About-AWS-App-Runner-and-what-to-expect-in-the-future
hedgehog051
0
120
また増えた!?AWSコンテナ関連サービスを10分でざっくり掴もう/Learn-about-AWS-0container-services-in-10-minutes
hedgehog051
0
130
Other Decks in Technology
See All in Technology
ルールルルルル私的函館観光ガイド── 函館の街はイクラでも楽しめる!
nomuson
0
100
今年60歳のおっさんCBになる
kentapapa
1
360
ログ基盤・プラグイン・ダッシュボード、全部整えた。でも最後は人だった。
makikub
5
1.4k
ふりかえりを 「あそび」にしたら、 学習が勝手に進んだ / Playful Retros Drive Learning
katoaz
0
440
Hooks, Filters & Now Context: Why MCPs Are the “Hooks” of the AI Era
miriamschwab
0
130
LLM とプロンプトエンジニアリング/チューターを定義する / LLMs and Prompt Engineering, and Defining Tutors
ks91
PRO
0
330
DIPS2.0データに基づく森林管理における無人航空機の利用状況
naokimuroki
0
190
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
1.4k
Databricksで構築するログ検索基盤とアーキテクチャ設計
cscengineer
0
140
主催・運営として"場をつくる”というアウトプットのススメ
_mossann_t
0
140
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
17k
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.2k
Featured
See All Featured
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
120
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
250
Unsuck your backbone
ammeep
672
58k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
160
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.8k
How to train your dragon (web standard)
notwaldorf
97
6.6k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
120
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
260
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
150
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
710
Transcript
concurrencyで 爆速並列デプロイ
Profile HedgehogTemplateFormatVersion: "2010-09-09” Resources: MyProfile: Type: "Hedgehog::HumanInterface::Profile" Properties: Name: Kumada
Kan Company: Relic Inc. Job: SiteReliabilityEngineer Like: CDK Twitter: @hedgehog051 Tags: - Key: ENV Value: Production 2
concurrency concurrencyオプションを使用すると、 スタック間の依存関係を考慮しながら 複数スタックを並行してデプロイが可能となり、 デプロイの高速化を実現 3
Concurrencyオプションの変遷 4 並列デプロイ実装に TL沸き⽴つが 即revert 😭
Concurrencyオプションの変遷 5 🎉 翌週に改めて再導⼊︕ 🎉 🎉 🎉
Topic 6 取り敢えず2並列でやったろと -—concurrency 2を追加して cdk deployを実行したらエラーが発生
Topic 7 参照:https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk/lib/cdk-toolkit.ts 中身を見る
Topic 8 承認が必要なStackにConcurrencyオプションを使用して 2以上の並列デプロイを実行する場合、承認の変更レベル を”never” にして承認不要にする必要がある模様
Topic 9 --require-approval LEVEL ・never: 承認は不要 ・any-change: IAMやsecurity-group-related関連の変更には承認が必要 ・broadening(デフォルト) IAMステートメントやトラフィックルールの追加には承認が
必要、削除には承認は必要なし
Topic 10 require-approvalのLEVELはcdk.jsonでも設定固定可能 チェックなしのフルオートでロックにデプロイするぜ! って人は頭の片隅に入れておくと良いかも知れません。
Topic 11 Concurrencyオプションは内部的にはp-queueを使って並列実行を制御 曰くp-queueは「非同期 (または同期) 操作のレート制限に役立ちます。 たとえば、REST APIを操作する場合や、CPU/メモリを集中的に使用する タスクを実行する場合です。」 Concurrencyオプションで指定した数字はp-queueへ同時実行数の上限
として渡される。
まとめ 12 - v2.39.0以降からConcurrencyオプションが使用可能 - 承認が必要なStackを並列デプロイする場合は、承認の変更レベルは”never”必須 - 並列処理制御にはp-queueが使用されている
͋Γ͕ͱ͏͍͟͝·ͨ͠