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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
hedgehog051
December 14, 2022
Technology
1
1.9k
concurrencyで爆速並列デプロイ
CDKのconcurrencyオプションによる並列デプロイについて
hedgehog051
December 14, 2022
Tweet
Share
More Decks by hedgehog051
See All by hedgehog051
AWS Generative AI CDK Constructsについて
hedgehog051
3
320
KnowledgeBasesとAgentsの紹介
hedgehog051
4
1.8k
BedrockUpdatesPost-GW Summary
hedgehog051
4
900
来てくれ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
110
また増えた!?AWSコンテナ関連サービスを10分でざっくり掴もう/Learn-about-AWS-0container-services-in-10-minutes
hedgehog051
0
120
Other Decks in Technology
See All in Technology
クレジットカード決済基盤を支えるSRE - 厳格な監査とSRE運用の両立 (SRE Kaigi 2026)
capytan
6
2.7k
Claude_CodeでSEOを最適化する_AI_Ops_Community_Vol.2__マーケティングx_AIはここまで進化した.pdf
riku_423
2
530
こんなところでも(地味に)活躍するImage Modeさんを知ってるかい?- Image Mode for OpenShift -
tsukaman
0
120
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
340
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
2
230
StrandsとNeptuneを使ってナレッジグラフを構築する
yakumo
1
100
Amazon Bedrock Knowledge Basesチャンキング解説!
aoinoguchi
0
130
[CV勉強会@関東 World Model 読み会] Orbis: Overcoming Challenges of Long-Horizon Prediction in Driving World Models (Mousakhan+, NeurIPS 2025)
abemii
0
110
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
1.8k
Codex 5.3 と Opus 4.6 にコーポレートサイトを作らせてみた / Codex 5.3 vs Opus 4.6
ama_ch
0
120
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
530
Featured
See All Featured
Bash Introduction
62gerente
615
210k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
160
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
75
So, you think you're a good person
axbom
PRO
2
1.9k
Designing Experiences People Love
moore
144
24k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
64
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Raft: Consensus for Rubyists
vanstee
141
7.3k
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が使用されている
͋Γ͕ͱ͏͍͟͝·ͨ͠