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
1.8k
concurrencyで爆速並列デプロイ
CDKのconcurrencyオプションによる並列デプロイについて
hedgehog051
December 14, 2022
Tweet
Share
More Decks by hedgehog051
See All by hedgehog051
AWS Generative AI CDK Constructsについて
hedgehog051
2
270
KnowledgeBasesとAgentsの紹介
hedgehog051
4
1.7k
BedrockUpdatesPost-GW Summary
hedgehog051
4
780
来てくれClaude 3! Agents for Amazon Bedrockのモデル比較或いはチューニングの話
hedgehog051
5
1.7k
Relic_Tech_Camp_GenerativeAI.pdf
hedgehog051
11
88k
AWSにおけるデータ分析入門 / Introduction To Data Analytics In AWS
hedgehog051
0
230
AWS App Runnerについてとこれから期待したいこと/About-AWS-App-Runner-and-what-to-expect-in-the-future
hedgehog051
0
94
また増えた!?AWSコンテナ関連サービスを10分でざっくり掴もう/Learn-about-AWS-0container-services-in-10-minutes
hedgehog051
0
110
Other Decks in Technology
See All in Technology
Turn Your Community into a Fundraising Catalyst for Black Philanthropy Month
auctria
PRO
0
120
CSPヘッダー導入で実現するWebサイトの多層防御:今すぐ試せる設定例と運用知見
llamakko
1
200
データエンジニアリング 4年前と変わったこと、 4年前と変わらないこと
tanakarian
2
360
The Madness of Multiple Gemini CLIs Developing Simultaneously with Jujutsu
gunta
1
2.5k
AWS Well-Architected から考えるオブザーバビリティの勘所 / Considering the Essentials of Observability from AWS Well-Architected
sms_tech
1
850
生成AIによる情報システムへのインパクト
taka_aki
1
130
From Live Coding to Vibe Coding with Firebase Studio
firebasethailand
1
110
Bliki (ja), and the Cathedral, and the Bazaar
koic
8
1.3k
QAを早期に巻き込む”って どうやるの? モヤモヤから抜け出す実践知
moritamasami
2
180
2025-07-25 NOT A HOTEL TECH TALK ━ スマートホーム開発の最前線 ━ SOFTWARE
wakinchan
0
120
経理出身PdMがAIプロダクト開発を_ハンズオンで学んだ話.pdf
shunsukenarita
1
110
P2P通信の標準化 WebRTCを知ろう
faithandbrave
6
2.3k
Featured
See All Featured
Gamification - CAS2011
davidbonilla
81
5.4k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.5k
Embracing the Ebb and Flow
colly
86
4.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
760
Git: the NoSQL Database
bkeepers
PRO
431
65k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
Writing Fast Ruby
sferik
628
62k
How to Ace a Technical Interview
jacobian
278
23k
Art, The Web, and Tiny UX
lynnandtonic
301
21k
KATA
mclloyd
30
14k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
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が使用されている
͋Γ͕ͱ͏͍͟͝·ͨ͠