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
hedgehog051
December 14, 2022
Technology
1.9k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
concurrencyで爆速並列デプロイ
CDKのconcurrencyオプションによる並列デプロイについて
hedgehog051
December 14, 2022
More Decks by hedgehog051
See All by hedgehog051
AWS Generative AI CDK Constructsについて
hedgehog051
3
350
KnowledgeBasesとAgentsの紹介
hedgehog051
4
1.9k
BedrockUpdatesPost-GW Summary
hedgehog051
4
1k
来てくれClaude 3! Agents for Amazon Bedrockのモデル比較或いはチューニングの話
hedgehog051
5
1.8k
Relic_Tech_Camp_GenerativeAI.pdf
hedgehog051
12
90k
AWSにおけるデータ分析入門 / Introduction To Data Analytics In AWS
hedgehog051
0
260
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
Terraformモジュールは、なぜ「魔境」化するのか
hayama17
1
190
速さだけじゃない! VoidZero ツールが移行先に選ばれる理由
mizdra
PRO
6
750
AI駆動開発が変える、大規模開発の前提 ーHuman in the Loop から Human on the Loop へ / AIE2026
visional_engineering_and_design
8
5.8k
「コーディング」しない人のための Claude Code 入門 ChatGPT の次の一歩 — 業務に組み込む 育成・共有・自動化
rfdnxbro
2
1.2k
JJUG CCC 2026 Spring AI時代の開発こそ標準化を武器に! ― 方式・プロセス・プラットフォームの標準化
s27watanabe
2
720
EventBridge Connection
_kensh
4
530
ブロックチェーン / Blockchain
ks91
PRO
0
110
React、まだ楽しくて草
uhyo
7
4.1k
AI と創る新たな世界 / A New World Created with AI
ks91
PRO
0
110
新アーキテクチャ「TiDB X」解説とDedicated比較 TiDB Cloud Premiumのゲーム運用活用を検証
staffrecruiter
0
110
Mastering Ruby Box
tagomoris
3
150
Claude Codeを組織で使いこなす— サーバサイドAIエージェント運用の実践知
techtekt
PRO
0
200
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
463
34k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
220
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
300
The Spectacular Lies of Maps
axbom
PRO
1
790
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
770
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.3k
Thoughts on Productivity
jonyablonski
76
5.2k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
840
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
400
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
440
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が使用されている
͋Γ͕ͱ͏͍͟͝·ͨ͠