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
実践サーバーレスパフォーマンスチューニング ~その実力に迫る~ / Practical ...
Search
shiro seike
PRO
October 12, 2024
Programming
2
350
実践サーバーレスパフォーマンスチューニング ~その実力に迫る~ / Practical Serverless Performance Tuning ~A Close Look at its Power~
JAWS FESTA 2024 in 広島
https://jawsfesta2024.jaws-ug.jp
shiro seike
PRO
October 12, 2024
Tweet
Share
More Decks by shiro seike
See All by shiro seike
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
0
0
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
110
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
520
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
1.1k
PHPを書く理由、PHPを書いていて良い理由 / Reasons to write PHP and why it is good to write PHP
seike460
PRO
5
600
AWS CDKを用いたセキュアなCI/CDパイプラインの構築 / Build a secure CI/CD pipeline using AWS CDK
seike460
PRO
3
760
いまあるチームにフィットさせる Serverless そして Platform Engineeringへの挑戦 / Serverless Fits the Team You Have and Platform Engineering
seike460
PRO
2
2.1k
いまあるチームにフィットさせる Serverless / Serverless fits in with the team you have now.
seike460
PRO
2
180
地方こそサーバーレス! チームにフィットさせるサーバーレス / Rural areas are serverless! Serverless to Fit Your Team
seike460
PRO
1
120
Other Decks in Programming
See All in Programming
創造的活動から切り拓く新たなキャリア 好きから始めてみる夜勤オペレーターからSREへの転身
yjszk
1
130
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
Beyond ORM
77web
2
290
Zoneless Testing
rainerhahnekamp
0
120
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
3
1.1k
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
700
Symfony Mapper Component
soyuka
2
730
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.6k
Full stack testing :: basic to basic
up1
1
930
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
210
Featured
See All Featured
A Tale of Four Properties
chriscoyier
157
23k
Statistics for Hackers
jakevdp
796
220k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Six Lessons from altMBA
skipperchong
27
3.5k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Facilitating Awesome Meetings
lara
50
6.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
Being A Developer After 40
akosma
87
590k
Music & Morning Musume
bryan
46
6.2k
Transcript
©Fusic Co., Ltd.  1 ࣮ફαʔ バ ʔϨε パ ϑΥʔϚϯενϡʔχϯ
グ ~ͦͷ࣮ྗʹഭΔ~ 2024.10.12 @seike460 JAWS FESTA 2024 in ౡ
©Fusic Co., Ltd. 2 ਗ਼Ո ࢙ @seike460 AWS Community Builder
Serverless BacklogWorld2024 ࣮ߦҕһ 12/14@ԣ ίϛϡχςΟ JAWS-UG Fukuoka Serverless Meetup Fukuoka Cloudflare Meetup Fukuoka JBUG Fukuoka JP_Stripes Fukuoka Fukuoka.php Fukuoka.go ࣗݾհ ͡Ίʹ גࣜձࣾFusicʢԬʣ ϓϦϯγύϧΤϯδχΞ/ΤόϯδΣϦετ
©Fusic Co., Ltd. 3 CONTENTS ࣍ 1. αʔόʔϨεͱύϑΥʔϚϯε 2. ϘτϧωοΫͷ୳ࡧͱՄࢹԽ
3. ϘτϧωοΫݪҼͷߟ 4. ϘτϧωοΫͷΞϓϩʔν 5. ·ͱΊ
©Fusic Co., Ltd. 4 αʔόʔϨεͱύϑΥʔϚϯε 1
©Fusic Co., Ltd. 5 αʔόʔϨεͱύϑΥʔϚϯε αʔόʔϨεΞʔΩςΫνϟجຊϚωʔδυαʔϏε͕લఏ - Πϯϑϥཧෆཁ - ࣗಈεέʔϦϯά
ͦͷજࡏೳྗͷߴ͔͞ΒʮͳΜͱͳ͘ʯߏஙͯ͠ ߴ͍ύϑΥʔϚϯε͕ग़Δ͜ͱ͕ଟ͍Ͱ͢ ҰํͰԿߟ͑ͳ͍ͱαʔόʔϨεͷ࣮ྗΛൃش͠Δ͜ͱͰ͖·ͤΜ
©Fusic Co., Ltd. 6 αʔόʔϨεͰύϑΥʔϚϯεΛग़͢ҝʹඞཁͳࣄ αʔόʔϨεΞʔΩςΫνϟجຊతʹߴύϑΥʔϚϯε ͔ͩΒͦ͜গ͠ͷϘτϧωοΫݦࡏԽ͍͢͠ͱ͍͏ಛ͕͋Δ ͰԿΛ͢ΕΑ͍ͷ͔ ʮਖ਼͘͠ঢ়گΛѲͯ͠ɺਖ਼͘͠ରॲΛ͠ଓ͚Δʯࣄʹਚ͖·͢ αʔόʔϨεΞʔΩςΫνϟͷίΞίϯϙʔωϯτͰ͋Δ
AWS LambdaΛத৺ʹύϑΥʔϚϯενϡʔχϯάΛߦͬͯΈ·͠ΐ͏
©Fusic Co., Ltd. 7 The Serverless ArchitectureͳΑ͋͘Δߏ - Amazon API
Gateway - RESTful APIͷΤϯυϙΠϯτΛఏڙ - AWS Lambda - ϏδωεϩδοΫΛ࣮ ࠓճPython - Amazon DynamoDB - σʔλετΞͱͯ͠ར༻ - AWS SAM - Serverless༻ͷIaC
©Fusic Co., Ltd. 8 ࠓճ୯ମͷॲཧվળ ࠓճrpsͰͳͯ͘ ͻͨ͢Β୯ମͷॲཬΛվળ͠·͢ ݁Ռrps࣮֬ʹ্͠·͢ AWS LambdaΛத৺ʹ
ϘτϧωοΫΛ୳ͯ͠ վળΛߦ͍͖ͬͯ·͠ΐ͏
©Fusic Co., Ltd. 9 ϘτϧωοΫͷ୳ࡧͱՄࢹԽ 2
©Fusic Co., Ltd. 10 ϘτϧωοΫͷ୳ٻ(※େલఏɺຊདྷHandlerͱॲཧ͚·͠ΐ͏) ͋Δ͕͍ؔͱใࠂ AWS LambdaͷίʔυΛ ݟͯΈΔͱࠨͷίʔυ͕ ࠨͷίʔυΛύοτݟͰ
ਖ਼͘͠վળ͢Δ͜ͱ ग़དྷ·͔͢ʁ -> NOͩ͠ɺYESͱ͑Δਓ͕ ͍ͯ࠶ݱੑͷͳ͍ݸਓೳྗ
©Fusic Co., Ltd. 11 ࠓԿ͕ى͍ͬͯ͜Δ͔Θ͔Βͳ͍ গ͠ҙਂ͘ݟͯ… - Handlerʹ༷ʑͳॲཧ͕ - Ͳ͔͔͜ΒUserͷใऔಘ͕
- ԿΒN+1͕ - Ͳ͔͜ʹAPIΞΫηεͯ͠Δʁ ͍ॲཧͷதʹ৭ʑͳ͕ ೖ͍ͬͯͦ͏
©Fusic Co., Ltd. 12 AWS X-Ray ΞϓϦέʔγϣϯͷύϑΥʔϚϯεΛ͠ՄࢹԽ͢ΔͨΊͷαʔϏε τϨʔεΛͬͯࢄγεςϜͷϦΫΤετͷྲྀΕΛࢹ֮Խ ಛʹαʔόʔϨεΞʔΩςΫνϟͰ༗༻
©Fusic Co., Ltd. 13 AWS X-Ray ͷΈ - τϨʔγϯάσʔλͷऩू -
࠷ॳʹτϨʔε IDΛੜͯ͠ɺ֤छαʔϏεʹ࿈ܞ - τϨʔεηάϝϯτΛར༻ͯ͠ՄࢹԽ͢Δ - LambdaɺAPI GatewayɺDynamoDB ͳͲͷαʔϏε - ҙͷαϒηάϝϯτͷ֓೦ಋೖՄೳ - τϨʔεͷྲྀΕ - ϦΫΤετ͕ͲͷαʔϏεΛ௨ա͢Δ͔ΛՄࢹԽ Ͳ͜Ͱ͍͔ɺΤϥʔ͕ൃੜ͍ͯ͠ͳ͍͔֬ೝՄೳ
©Fusic Co., Ltd. 14 AWS X-Ray ͷಋೖɿtemplate.yaml AWS SAM Template.yaml
Tracing: Active Λهड़͢Δ τϨʔεID͕ੜ͞ΕΔ Α͏ʹͳΔ
©Fusic Co., Ltd. 15 AWS X-Ray ͷಋೖɿιʔείʔυ requirements.txtΛར༻͠ pip install
ͦͷޙpatch_all()Λ࣮ߦ͢Δ ֤छAWSαʔϏεͷ τϨʔε͕ߦΘΕͯɺ τϨʔεϚοϓ͕࡞͞ΕΔ
©Fusic Co., Ltd. 16 AWS X-Ray τϨʔεϚοϓ ԿΒ༷ʑͳґଘ͕ؔ͋Γͦ͏
©Fusic Co., Ltd. 17 AWS X-Ray τϨʔεϚοϓ ԿΒ༷ʑͳґଘ͕ؔ͋Γͦ͏ - DynamoDB
- S3 - DynamoDB - ֎෦API
©Fusic Co., Ltd. 18 ߋʹιʔείʔυͷϘτϧωοΫΛ͏ segment୯ҐͰͷτϨʔε͕Մೳ xray_recorder.begin_subsegment xray_recorder.end_subsegment Ͱࢦఆൣғͷsubsegment୯Ґͷ࣮ߦ࣌ؒ with
xray_recorder.in_subsegment ࣮ࡍͷॲཬ ͱ͍͏ॻ͖ํՄೳ
©Fusic Co., Ltd. 19 ߋʹιʔείʔυͷϘτϧωοΫΛ͏ segment୯ҐͰͷτϨʔε͕Մೳ xray_recorder.begin_subsegment xray_recorder.end_subsegment Ͱࢦఆൣғͷsubsegment୯Ґͷ࣮ߦ࣌ؒ with
xray_recorder.in_subsegment ࣮ࡍͷॲཬ ͱ͍͏ॻ͖ํՄೳ
©Fusic Co., Ltd. 20 ؔ୯ҐͰͷTraceՄೳ ؔ୯ҐͰTrace͍ͨ͠߹ @xray_recorder.captureΛར༻ ࣮ߦ͕͔͔͍࣌ؒͬͯΔؔͷಛఆ͕Մೳ
©Fusic Co., Ltd. 21 ؔͰͷαϒηάϝϯτઃఆ͕Մೳ ෳࡶ͔ͭߴՃ͕͔͔Δcomplex_logicʹ ॲཧ͕͔͔͍࣌ؒͬͯΔՕॴΛಛఆ͢Δҝɺ Segment୯ҐͰͷऩूΛ࣮ࢪ ※͜ͷؔͷதࣗମChatGPTʹ ʮpandasͱnumpyΛͬͨCPUόϯυͳॲཧʯ
Λੜͯ͠Β͍·ͨ͠ ސ٬ͷϥΠϑλΠϜՁʢCLVʣ ͷγϛϡϨʔγϣϯΒ͍͠ ؔͷதͰ͕͔͔͍࣌ؒͬͯΔϙΠϯτ͕ Ͳ͜ͳͷ͔ͷಛఆ͕ग़དྷΔ
©Fusic Co., Ltd. 22 ؔͰͷαϒηάϝϯτઃఆ͕Մೳ
©Fusic Co., Ltd. 23 AWS X-Ray τϨʔεը໘ શମͰ23ඵͱ͓ੈࣙʹૣ͍ͱݴ͑ͳ͍͜ͱ͕ݟ͑Δ ҰͭҰͭυϦϧμϯ͍͖ͯ͠·͠ΐ͏
©Fusic Co., Ltd. 24 ϘτϧωοΫݪҼͷߟ 3
©Fusic Co., Ltd. 25 Init -> ColdStart initʹ͕͔͔͍࣌ؒͬͯΔࣄ͕Θ͔Δ -> ColdStart͕3ඵͱൺֱత͍ͷͰɺColdStartରࡦ͚ͩͰ͋Δఔվળͦ͠͏
©Fusic Co., Ltd. 26 Ϣʔβʔใͷऔಘ Ϣʔβʔใͷऔಘʹͯɺget_users -> get_user_infoͱ͍͏ DynamoDBʹؔ͢Δσʔλऔಘ͕ൃੜ͍ͯ͠Δ get_usersͱ͍͏ෳͷऔಘͱget_user_infoͱ͍͏ύʔςΟγϣϯΩʔʹରͯ͠
ߦ͍ͦ͏ͳؔͰDynamoDBʹର͢Δ͕ࠩ΄΅ͳ͍͜ͱ͕ؾʹͳΔ
©Fusic Co., Ltd. 27 Ϣʔβʔใͷऔಘ Ϣʔβʔใͷऔಘʹͯɺget_users -> get_user_infoͱ͍͏ DynamoDBʹؔ͢Δσʔλऔಘ͕ൃੜ͍ͯ͠Δ get_usersͱ͍͏ෳͷऔಘͱget_user_infoͱ͍͏ύʔςΟγϣϯΩʔʹରͯ͠
ߦ͍ͦ͏ͳؔͰDynamoDBʹର͢Δ͕ࠩ΄΅ͳ͍͜ͱ͕ؾʹͳΔ
©Fusic Co., Ltd. 28 DynamoDBʹର͢ΔN+1 get_user_info͕܁Γฦ͞Ε͍ͯΔ N+1͕ൃੜ͍ͯ͠Δࣄ͕Θ͔Δ DynamoDBʹܧଓతͳෛՙ͕͔͔Δ͠ ୯७ʹύϑΥʔϚϯεͷӨڹ͕ग़͍ͯΔ
©Fusic Co., Ltd. 29 complex_logicͱ͍͏ෛՙ͕ߴ͍ؔ complex_logicͱ͍͏ෛՙ͕ߴ͍ؔͷதͰɺ ಛʹγϛϡϨʔγϣϯΛߦ͍ͬͯΔ෦ͷෛՙ͕ߴ͍͜ͱ͕ݟ͑Δ ͳ͓͔ͭઌఔ֬ೝͨ࣌͠ʹɺͻͨ͢ΒܭࢉॲཧΛߦ͍ͬͯͨ͜ͱ֬ೝग़དྷͨͷͰ ୯७ʹCPUͷରॲ͔͠ͳͦ͞͏
©Fusic Co., Ltd. 30 վम͕͍͠֎෦APIͷϘτϧωοΫ ֎෦APIΞΫηε͍ͯͯ͠ɺվम͕͍͠ύϑΥʔϚϯεͷϘτϧωοΫ ֬ೝ͕ग़དྷͨ ʢhttpbin.org֤Methodʹର͢ΔϨεϙϯεΛฦͯ͘͠ΕΔαΠτʣ
©Fusic Co., Ltd. 31 શମͷ͕ݟ͑ͯ͘Δ ·ͩશʹΘ͔͍ͬͯͳ͍͕վम͠ͳ͚ΕͳΒͳ͍ର͕ߜΕ͖ͯͨ ࠓճSegment୯ҐͰѲ͠ʹ͍͍ͬͯΔ͕ɺࡶʹpatch_all͢Δ͚ͩͰ༗༻Ͱ͢
©Fusic Co., Ltd. 32 Lambda Insights AWSͷαʔϏεΛར༻͢ΔͳΒ Lambda InsightsҰͭͷखஈ ػೳΛOnʹ͢Δ͚ͩͰ
AWS LambdaͷύϑΥʔϚϯε ʹؔΘΔσʔλͷՄࢹԽ͕ ͘͢͠ͳΓ·͢
©Fusic Co., Ltd. 33 Lambda Insights ύϑΥʔϚϯεΛࣔ࣌ؒ͢ CPUͷ༻࣌ؒϝϞϦͷ༻ྔωοτϫʔΫIO·ͰݟΕΔ ͜͜Ͱେ·͔ͳঢ়گΛ࠷৽1000݅·ͰѲ͢Δ͜ͱ͕Մೳʹ
©Fusic Co., Ltd. 34 Lambda Insights Performanceϩά ColdStart͍ͯ͠Δ͔ɺColdStartͷ࣌ؒͳͲදࣔ ϝϞϦ༻ྔѲͰ͖ΔͷͰ ࣮ࡍͷLambdaͷϝϞϦαΠζΛܾΊΔ࣌ͷ
ඇৗʹࢀߟʹͳΓ·͢ ࠓճϝϞϦ90%Ҏ্͍ͬͯ·͢͠ CPUύϫʔΛ্͍͛ͨͷͰϝϞϦΛ1024MB·Ͱ্͛·͢ ※AWS Lambda ͷCPUϝϞϦґଘ ߋʹ͜ͷιʔείʔυΛཧղ͢ΔͨΊʹѲΛਐΊΔ
©Fusic Co., Ltd. 35 cProfile ιʔείʔυͷதͷϥΠϒϥϦͷதͷॲཧ·Ͱ ੳ͢ΔͨΊʹcProfileͱ͍͏ϥΠϒϥϦΛར༻ cProfile.Profile().enable cProfile.Profile().disable ͷؒͷϓϩάϥϜ࣮ߦΛؔͷ୯ҐͰ
ͯ͢ϓϩϑΝΠϦϯάͯ͘͠ΕΔεάϨϞϊ ※ࠓճPythonͳͷͰcProfile͕ͩ PHPͳΒ Xdebug GoͳΒ pprof JavaScriptͳΒ Profiler API
©Fusic Co., Ltd. 36 cProfile ࠷ऴతʹϓϩϑΝΠϦϯά݁ՌΛऔΓग़͢ ඞཁ͕͋ΔͷͰS3ʹϑΝΠϧอଘ ͦͷϑΝΠϧΛऔಘͯ͠ɺ ϩʔΧϧͷPCͰ࣮ࡍͷղੳΛߦ͏ ※S3ͷputݖݶΛΕͣʹ
©Fusic Co., Ltd. 37 snakeviz औಘͨ͠profϑΝΠϧΛ ՄࢹԽ͢ΔͨΊʹ ʮsnakevizʯΛར༻ profϑΝΠϧΛಡΈࠐ·ͤ ϩʔΧϧαʔόʔΛཱͯΔ
http:://localhost:8080 ࠨͷ༷ͳάϥϑ͕֬ೝՄೳʹ
©Fusic Co., Ltd. 38 snakeviz ؔΛΫϦοΫ͢Δͱ υϯυϯؔʹજΓɺ Ͳ͕͜ݪҼͷؔͳͷ͔ ಛఆ͢Δ͜ͱ͕Մೳ
©Fusic Co., Ltd. 39 snakeviz connectionpool.py͕ ͔ͳΓͷׂ߹ΛΊ͍ͯΔ Կར༻͢Δ෦Ͱ͋Δ͕ ຊདྷଓΛҰߦͬͯɺ ͍ճ࣮͢ʹͳͬͯΔͣ
͔ͯ͠͠connectionpool͕ ਖ਼͑ͯ͘͠ͳ͍ʁ
©Fusic Co., Ltd. 40 snakeviz Call͞Ε͍ͯΔճɺ͔͔͍ͬͯΔؙ࣌ؒΘ͔ΓͳͷͰɺରॲ͕͍͢͠ ͱ͍͑ؔΊͪΌͪ͘Ό͕͋ΔͷͰɺ ਖ਼͜Ε͚ͩͩͱݫ͠͞Λײ͡ΔͨΊɺAWS X-rayͱͷ݁ՌΛΈ߹Θͤͯ ߟ͢Δͷ͕ྑ͍
©Fusic Co., Ltd. 41 ରॲ༰ͷߟ - CPUόϯυͳܭࢉॲཧ͕େ͖͘Өڹ - CPUΛ্͛ΔͨΊʹɺϝϞϦαΠζΛ্͛ΔͱΑͦ͞͏ -
DynamoDBͷσʔλऔಘॲཬࣗମʹ͕͋Γͦ͏ - औಘؔͷॲཬݟ͕͠ඞཁͦ͏ - DynamoDBʹର͢ΔN+1͕ൃੜ͍ͯͦ͠͏ - DynamoDBͷઃܭݟ͠ͰରԠग़དྷͳ͍͔ - ֎෦APIͷΞΫηε͕ͦͷ··͘ͳΔ - ֎෦APIͷରॲग़དྷͳ͍ͷͰඇಉظʹॲཧͰ͖ͳ͍͔ ※ࠓճඇಉظॲཧͯ͠ྑ͍ͷͱ͢Δ
©Fusic Co., Ltd. 42 ࣮ࡍͷରॲΛߦ͍ͬͯ͘ ܭଌͷ݁ՌɺରԠࡦ·Ͱݟ͖͑ͯͨͷͰ࣮ࡍͷॲཧվળΛߦ͍ͬͯ͘
©Fusic Co., Ltd. 43 ϘτϧωοΫͷΞϓϩʔν 4
©Fusic Co., Ltd. 44 ϝϞϦαΠζΞοϓ ·ͣ୯७ʹϝϞϦαΠζΛ্͛ͯΈΔ 128 MB -> 1024MB
߹ΘͤͯArchitecturearm64ʹͨ͠΄͏͕ ૣ͘ͳΓ·͢ CPUόϯυͳcomplex_logic͕ ͔͋Β͞·ʹૣ͘ͳΔͷ͕Θ͔Δ
©Fusic Co., Ltd. 45 ϓϩϏδϣϯυίϯΧϨϯγʔͷద༻ ϓϩϏδϣϯυίϯΧϨϯγʔΛద༻͢Δ͚ͩͰ ίʔϧυελʔτ͕ରॲग़དྷΔ ϥΠϒϥϦΛݮΒ͢ࣄ͕ग़དྷͳ͍࣌ૉʹಋೖ
©Fusic Co., Ltd. 46 ϥΠϒϥϦͷImportͷରࡦΛߦ͍͍ͨ࣌ҎԼͷهࣄ Ҿ༻ɿhttps://qiita.com/_kensh/items/ce620ec5b53c623775ae AWSJ Serverless Specialist @_kensh
ͦΖͦΖΧϯϑΝϨϯεͰຊҰԼ͞ΜͷهࣄΛҾ༻͍ͯ͠ΔஉʹͳΓͦ͏Ͱ͢
©Fusic Co., Ltd. 47 DynamoDBΫϥΠΞϯτͷੜ ίʔυΛΑ͘ݟΔͱ͕ؔݺΕΔͨͼʹ DynamoDBΫϥΠΞϯτ͕ੜ͞Ε͍ͯͨ ͜ΕΛάϩʔόϧείʔϓͰ༧Ί࡞͢ΔࣄͰ ଓΛ͍ճ͢Α͏ʹग़དྷͨ
©Fusic Co., Ltd. 48 DynamoDBઃܭͷݟ͠ N+1ൃੜݪҼςʔϒϧΛUserͱUserInfosʹ͚ RDBͷࢥͰઃܭ͕ߦΘΕ͍͔ͯͨΒ 1ରଟͷؔΛޮతʹѻ͏ͨΊʹ ୯Ұςʔϒϧઃܭʹ͢Δ͜ͱͰN+1ͷղফ͕Մೳ
©Fusic Co., Ltd. 49 SQSʹΑΔඇಉظԽ ֎෦APIରॲ͕͠Α͏͕ͳ͍ͷͰɺ ϦΫΤετ͔ΒΓ͢ࣄͰରԠΛߦ͏ AWS SAMͰSQSΠϕϯτۦಈͷઃఆΛߦͬͯ SQSσʔλΛૹ৴͢Δ͚ͩ
ࢥͬͨΑΓඇಉظԽ؆୯ʹग़དྷΔ
©Fusic Co., Ltd. 50 SQSʹΑΔඇಉظԽ ֎෦API෦ΛSQSͷΩϡʔΠϯάʹมߋ SQSىಈͰผͷLambdaΛىಈ LambdaଆͰ֎෦APIΛݺͼग़͢ࣄͰɺ ֎෦APIґଘ͔Β٫
©Fusic Co., Ltd. 51 ॲཧ༰มߋͤͣͱߴԽ ͻͨ͢Βରॲ͢Δ͜ͱͰ23ඵ -> Λ1.26ඵ·ͰݮΒ͢͜ͱʹޭʢτϨʔε͠ͳ͕Βʣ ͬͯΔ͜ͱେͨ͠༰Ͱͳ͍ͷʹɺ͜͜·Ͱվળ͕ߦ͑Δ
©Fusic Co., Ltd. 52 αʔόʔϨεͰύϑΥʔϚϯενϡʔχϯάͷجຊಉ͡ ϚωʔδυαʔϏεϕʔεͷαʔόʔϨε݁ہΞʔΩςΫνϟ ύϑΥʔϚϯενϡʔχϯάͷجຊಉ͡Ͱ ܭଌɺߟɺ࣮ߦͷαΠΫϧΛճ͢ ͜ͷαΠΫϧΛճͨ݁͠Ռɺજࡏೳྗ͕ߴ͍ՁΛൃشͰ͖Δ
©Fusic Co., Ltd. 53 ·ͱΊ 5
©Fusic Co., Ltd. 54 ·ͱΊ αʔόʔϨεΞʔΩςΫνϟεέʔϧΛલఏͱ͍ͯ͠Δ͕ɺॲཧΛݟ͢͜ͱͰਅͷ࣮ྗΛൃش Point 01 ·ͣঢ়گͷѲ͕େࣄɺAWS X-rayɺLambda
InsightsɺϓϩϑΝΠϥʔΛۦͯ͠ܭଌͱѲ Point 02 ঢ়گͷѲ͕ग़དྷͨΒɺࠓ·ͰͷࣝΛۦͯ͠ҰͭҰ࣮ͭ֬ʹରॲɺܭଌΛ܁Γฦͯ͠վળ Point 03 ܭଌɺߟɺ࣮ߦͷαΠΫϧΛճͯ͠ɺServerlessͷਅͷՁʹ͖ۙͮ·͠ΐ͏ʂ Point 04
©Fusic Co., Ltd. 55 Thank You We are Hiring! https://recruit.fusic.co.jp/
͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠