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
Amazon Aurora DSQLパフォーマンスチェック / Amazon Aurora ...
Search
shiro seike
PRO
February 01, 2025
Programming
0
6
Amazon Aurora DSQLパフォーマンスチェック / Amazon Aurora DSQL Performance Check
#jawsugsaga24 2025年もクラウドでGO!新春LT大会
https://jawsug-saga.connpass.com/event/338826/
shiro seike
PRO
February 01, 2025
Tweet
Share
More Decks by shiro seike
See All by shiro seike
地方のPHPerもクラウドを使う理由 ~コストの最適化とチームに向き合う~ / Why even local PHPers use the cloud ~optimize costs and face the team
seike460
PRO
0
57
OpenTelemetryで始めるベンダーフリーなobservability / Vendor-free observability starting with OpenTelemetry
seike460
PRO
0
160
AIコーディングの本質は“コード“ではなく“構造“だった / The essence of AI coding is not “code” but "structure
seike460
PRO
2
790
OpenTelemetryを活用したObservability入門 / Introduction to Observability with OpenTelemetry
seike460
PRO
1
600
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
250
(再)ひとり技術広報からの脱却 / Re:Breaking away from one-man technical public relations
seike460
PRO
1
210
Amazon Q Developer Proで 効率化するAPI開発 / Streamline API Development with Amazon Q Developer Pro
seike460
PRO
0
6
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
1.1k
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
290
Other Decks in Programming
See All in Programming
TSConfig Solution Style & subpath imports to switch types on a per-file basis
maminami373
1
180
FastMCPでMCPサーバー/クライアントを構築してみる
ttnyt8701
2
100
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfold' relates to 'iterate'"
philipschwarz
PRO
0
140
Cursor Meetup Tokyo ゲノミクスとCursor: 進化と制約のあいだ
koido
1
420
漸進。
ssssota
0
1.2k
クラシルリワードにおける iOSアプリ開発の取り組み
funzin
1
810
TypeScript製IaCツールのAWS CDKが様々な言語で実装できる理由 ~他言語変換の仕組み~ / cdk-language-transformation
gotok365
7
380
Efficiency and Rock 'n’ Roll (Really!)
hollycummins
0
600
イベントストーミングから始めるドメイン駆動設計
jgeem
3
520
TypeScript だけを書いて Tauri でデスクトップアプリを作ろう / Tauri with only TypeScript
tris5572
2
540
推論された型の移植性エラーTS2742に挑む
teamlab
PRO
0
150
Javaに鉄道指向プログラミング (Railway Oriented Pro gramming) のエッセンスを取り入れる/Bringing the Essence of Railway-Oriented Programming to Java
cocet33000
1
220
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
19
1.3k
How GitHub (no longer) Works
holman
314
140k
Stop Working from a Prison Cell
hatefulcrawdad
269
20k
Why Our Code Smells
bkeepers
PRO
336
57k
BBQ
matthewcrist
88
9.7k
The Language of Interfaces
destraynor
158
25k
Into the Great Unknown - MozCon
thekraken
39
1.8k
Become a Pro
speakerdeck
PRO
28
5.4k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Faster Mobile Websites
deanohume
307
31k
How to train your dragon (web standard)
notwaldorf
92
6k
Transcript
©Fusic Co., Ltd. 1 Amazon Aurora DSQLΛࢼͯ͠ΈΔ 2025.02.01 @seike460 #jawsugsaga24
2025ΫϥυͰGOʂ৽य़LTେձ
©Fusic Co., Ltd. 2 ਗ਼Ո ࢙ AWS Community Builder Serverless
ίϛϡχςΟ Fukuoka.php Fukuoka.go JAWS-UG Fukuoka Serverless Meetup Fukuoka Cloudflare Meetup Fukuoka JP_Stripes Fukuoka ࣗݾհ ͡Ίʹ גࣜձࣾFusic ϓϦϯγύϧΤϯδχΞ/ΤόϯδΣϦετ
©Fusic Co., Ltd. 3 CONTENTS ࣍ 1. Amazon DSQLͱ 2.
Python͔Βܨ͍ͰΈΔ 3. ఏڙϦʔδϣϯͷ՝ 4. ·ͱΊ
©Fusic Co., Ltd. 4 Amazon DSQLͱ 1
©Fusic Co., Ltd. 5 Amazon DSQLͱ Amazon Aurora DSQLʢDistributed SQLʣAuroraͷ৽ػೳͰ͋Γɺ
ҎԼͷಛΛ࣋ͪ·͢ - ࢄSQLΞʔΩςΫνϟ - ΫϥελશମͰΫΤϦΛฒྻॲཧ͠ɺߴ͍εέʔϥϏϦςΟΛ࣮ݱ - άϩʔόϧͳσʔλҰ؏ੑ - ෳͷϦʔδϣϯʹ·͕ͨΔσʔλϕʔεͰ Ұ؏ͨ͠τϥϯβΫγϣϯΛఏڙ - PostgreSQLޓ - PostgreSQLͱͷޓੑΛ࣋ͪͭͭɺ ߴͳੳΫΤϦͱεϧʔϓοτΛఏڙ
©Fusic Co., Ltd. 6 2 Python͔Βܨ͍ͰΈΔ
©Fusic Co., Ltd. 7 Amazon DSQLͷ࡞͔ΜͨΜ Create clusterΛԡԼ
©Fusic Co., Ltd. 8 Amazon DSQLͷ࡞͔ΜͨΜ NameλάΛઃఆͰ͖ΔͷͰ໊લΛઃఆ͢Δ ϚϧνϦʔδϣϯʹ͍ͨ͠߹ Add linked
RegionsʹνΣοΫΛ͢Δ
©Fusic Co., Ltd. 9 Amazon DSQLͷ࡞͔ΜͨΜ ଓใৄࡉ͔ΒConnectΛԡ͢ͱͰ͖ͯ·͢
©Fusic Co., Ltd. 10 Python͔Βͷଓ ιʔείʔυΫϥεϝιου༷ͷͷΛྲྀ༻͖ͤͯ͞·ͨ͠ɻ ࢀߟURLɿhttps://dev.classmethod.jp/articles/connect-aurora-dsql-from-aws-cli-and-python-psycopg-on-aws-cloudshell/
©Fusic Co., Ltd. 11 InsertͱSelectΛ10ճ܁Γฦ͢ʢσϞʣ ͓ੈࣙʹૣ͍ͱݴ͑ͳ͍
©Fusic Co., Ltd. 12 ఏڙϦʔδϣϯͷ՝ 3
©Fusic Co., Ltd. 13 Amazon DSQLͷ՝ όʔδχΞ෦ʢus-east-1ʣͱΦϋΠΦʢus-east-2ʣͰ͔͠ར༻Ͱ͖ͳ͍ ͦͦ·ͩϓϨϏϡʔͳͷͰ͠ΐ͏͕ͳ͍ͷͰ͕͢ɺ ଠฏ༸ΛڬΜͰSQL͕ྲྀΕΔͷඇৗʹݫͦ͠͏
©Fusic Co., Ltd. 14 LambdaΛόʔδχΞ෦ʹཱͯΔʁ౦ژʹཱͯΔʁ ͦΕͰར༻͍ͨ͠߹ɺ AWS LambdaͱDSQLͷڑΛߟྀ͠όʔδχΞ෦ʹཱͯΔ͖ͳͷ͔ ͦΕͱAWS LambdaͷىಈΛ༏ઌͯ͠౦ژʹཱͯΔ͖ͳͷ͔
©Fusic Co., Ltd. 15 ࢼͯ͠ΈΑ͏ ͬ͞ͱAWS LambdaͰࢼͯ͠ΈΑ͏ͱಉ͡ιʔείʔυͰ ࢼͨ͠ͱ͜ΖΤϥʔ͕ൃੜɺIPv6ͷIPʹଓͰ͖ͯͳ͍Έ͍ͨ VPC Lambdaʹઃఆͯ͠IPv6ʹઃఆ͠ͳ͚ΕͳΒͳ͍
©Fusic Co., Ltd. 16 VPC LambdaΛ࡞ͯ͠IPv6ରԠͯ͠ࢼͯ͠ΈΔ VPC Lambda ʹରԠͯ͠IPv̒༗ޮԽͯ͠Έͯ͏·͍͔͘ͳ͍ connection
is bad: no error details available ʢଓෆྑɿΤϥʔͷৄࡉෆ໌ʣ ͦͷޙɺॾʑࢼ͍ͯͨ͠ͱ͜ΖɺIPv4ͷϩάग़ݱ࢝͠ΊΔ…
©Fusic Co., Ltd. 17 Γ͍ͨ͜ͱAmazon Aurora DSQLͷύϑΥʔϚϯε ʢ࠶ʣख๏Ϋϥεϝιου༷ͷͷΛྲྀ༻͖ͤͯ͞·ͨ͠ɻ ࢀߟURLɿhttps://dev.classmethod.jp/articles/connect-aurora-dsql-from-aws-cli-and-python-psycopg-on-aws-cloudshell/
©Fusic Co., Ltd. 18 InsertͱSelectΛ10ճ܁Γฦ͢ʢσϞʣ 1/40 ʙ 1/100·ͰߴԽͨ͠ͷͰɺྲྀੴʹڑͷࠩେ͖͍
©Fusic Co., Ltd. 19 ·ͱΊ 4
©Fusic Co., Ltd. 20 ·ͱΊ Amazon Aurora DSQLࢄSQLΞʔΩςΫνϟɺαʔόϨεͱͯ͠৺ͪʹͯͨ͠αʔϏε Point 01
ͪΖΜػೳ੍ݶͳͲ͋Δ͚Ͳɺ͑ͳ͍Θ͚Ͱͳ͍ Point 02 IPv6ରԠ͠ͳ͍ͱ͍͚ͳ͍ʁ -> ͭ·ΓVPC LambdaͰͳ͍ͱ͍͚ͳ͍ʁʢະ֬ఆʣ Point 03 ΓόʔδχΞ෦ͷํ͕രͰૣ͍ɺϓϨϏϡʔ֎Εͯૣ͘ຊϦʔδϣϯʹདྷͯཉ͍͠ʂ Point 04
©Fusic Co., Ltd. 21 Thank You We are Hiring! https://recruit.fusic.co.jp/
͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠