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
いまあるチームにフィットさせる Serverless そして Platform Enginee...
Search
shiro seike
PRO
September 21, 2024
Programming
2
2.1k
いまあるチームにフィットさせる Serverless そして Platform Engineeringへの挑戦 / Serverless Fits the Team You Have and Platform Engineering
ServerlessDays Tokyo 2024
https://tokyo.serverlessdays.io
shiro seike
PRO
September 21, 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
実践サーバーレスパフォーマンスチューニング ~その実力に迫る~ / Practical Serverless Performance Tuning ~A Close Look at its Power~
seike460
PRO
2
350
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 / 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
ドメインイベント増えすぎ問題
h0r15h0
1
190
testcontainers のススメ
sgash708
1
120
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
140
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
3
1.1k
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
180
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
140
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
760
The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | droidcon Italy
prof18
0
150
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
As an Engineers, let's build the CRM system via LINE Official Account 2.0
clonn
1
670
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
450
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
A designer walks into a library…
pauljervisheath
204
24k
Typedesign – Prime Four
hannesfritz
40
2.4k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Documentation Writing (for coders)
carmenintech
66
4.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
The Invisible Side of Design
smashingmag
298
50k
Scaling GitHub
holman
458
140k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
Transcript
©Fusic Co., Ltd.  1 ͍·͋ΔνʔϜʹϑΟοτͤ͞Δ Serverless ͦͯ͠ Platform Engineeringͷઓ
2024.09.22 @seike460 ServerlessDays Tokyo 2024
©Fusic Co., Ltd. 2 ਗ਼Ո ࢙ @seike460 AWS Community Builder
Serverless ίϛϡχςΟ Serverless Meetup Fukuoka Cloudflare Meetup Fukuoka Fukuoka.php Fukuoka.go JAWS-UG Fukuoka JP_Stripes Fukuoka JBUG Fukuoka ࣗݾհ ͡Ίʹ גࣜձࣾFusic ϓϦϯγύϧΤϯδχΞ/ΤόϯδΣϦετ
©Fusic Co., Ltd. 3 CONTENTS ࣍ 1. Serverless Ͱ͋Δ։ൃΛৼΓฦΔ 2.
Serverless ద༻͠ଓ͚ͨՁͱݱ࣮ 3. νʔϜʹϑΟοτͤ͞ΔServerless 4. νʔϜͱServerlessΛܨ͙ͨΊͷPlatform Engineeringͷઓ 5. ·ͱΊ
©Fusic Co., Ltd. 4 Serverless Ͱ͋Δ։ൃΛৼΓฦΔ 1
©Fusic Co., Ltd. 5 ServerlessͱͳΜͳͷ͔ Serverless 言 Cloud Native Computing
Foundation CNCF Serverless Whitepaper v 1 . 0 行 https://github.com/cncf/wg-serverless/tree/master/whitepapers/serverless-overview
©Fusic Co., Ltd. 6 Serverlessͷ֓೦ΛऔΓೖΕΔϝϦοτଟ Serverless Architecture 入 入 入
大 小 Serverless Serverless Architecture 用 行
©Fusic Co., Ltd. 7 ServerlessΒ͠͞ Serverlessͱ֓೦Ͱ͋Γɺ ͜ͷαʔϏεServerlessͰ͋ΔɺServerlessͰͳ͍ͱ͍͏ٞࣗମ ࣮ߦ͏ඞཁ͕ͳ͍ͷ͔͠Εͳ͍ େࣄͳͷServerlessͱ͍͏֓೦ͷཧղΛਂΊ ʮServerlessΒ͠͞ͷਖ਼ମΛ௫Ή͜ͱʯ
©Fusic Co., Ltd. 8 ServerlessΒ͠͞ͷਖ਼ମʁ ServerlessΩϟογϡͰ༗໊ͳmomentoʹΑΔදݱ 1. ϓϩϏδϣϯෆཁɺཧෆཁ 2. ࠷ྉۚͷͳ͍͚ͬͨͩͷࢧ͍
3. 1 ͭͷ API ݺͼग़͠Ͱར༻Մೳ 4. ܭըఀࢭ͕ͳ͍ 5. Πϯελϯε͕ͳ͍ Serverlessͷಛଊ͓͑ͯΓڌΓॴʹͯ͠ྑ͍ͱࢥ͏͕ ݸਓతͳҙࣝͱͯ͠ʮ͑ͩͱߟ͑Δඞཁͳ͍ʯ ServerlessΒ͍͠αʔϏεΞοϓσʔτ͞Ε͍ͯ͘͠ɺ ৽͍֓͠೦ͷՃʹΑΓServerlessΒ͠͞มΘ͍ͬͯ͘
©Fusic Co., Ltd. 9 ServerlessΒ͋͘͠Ζ͏ͱ͢Δ Serverlessͱ͍͏ͷʮ͜Ε͚͕ͩServerlessͰ͋Δʯͱ͍͏ͷͰͳ͍ͱࢥ͍ͬͯ·͢ ࠓճ͜ͷServerlessͷ֓೦ΛऔΓೖΕΑ͏ͱઓ͠ଓ͚ͯఏڙ͖ͯͨ͠Ձͱڞʹ ͦͷதͰݟ͖͑ͯͨ։ൃऀʹΛ͚ͯʮνʔϜʹϑΟοτͤ͞Δʯ͜ͱΛߟ͑ͨ ઓͷΛ͖ͤͯ͞·͢
©Fusic Co., Ltd. 10 Serverless ద༻͠ଓ͚ͨݱ࣮ 2
©Fusic Co., Ltd. 11 ฐࣾͷٕज़ελοΫ PHPɺRubyɺͦͯ͠AWSΛத৺ͱͨ͠डୗ։ൃΛओʹߦ͍ͬͯ·ͨ͠ ࣗࣾϓϩμΫτPHPͰ։ൃ͓ͯ͠Γɺٕज़ελοΫͱͯ͠PHPΓͤͳ͍ͷ ҰํͰPHPAWS LambdaͷެࣜϥϯλΠϜ͕ଘࡏ͠ͳ͍ɺϛεϚον͕͋ͬͨ ͦΜͳதServerlessͷՁΛײͯ͡ɺಋೖΛଓ͚·ͨ͠
©Fusic Co., Ltd. 12 ServerlessͳAPIΛՃՁͱͯ͠Ճ EC 2 Web API Web
API API Gateway -> Lambda -> S 3 Json EC 2 cron Web 大 200 用
©Fusic Co., Ltd. 13 ServerlessͳAPIΛՃՁͱͯ͠Ճ 一見 Web 自 Serverless API
自 行 小 Python 行 Go
©Fusic Co., Ltd. 14 ݴޠʹΑΒͳ͍ServerlessͳαΠτߏங 0 力 用 Serverless
©Fusic Co., Ltd. 15 ݴޠʹΑΒͳ͍ServerlessͳαΠτߏங AWS Amplify 用 AWS Amplify
GraphQL AWS AppSync 用 AWS Configuration GraphQL Serverless 行 AWS Amplify ( 自 )
©Fusic Co., Ltd. 16 ϥϯλΠϜͱͷϛεϚον ࣮֬ʹServerlessͷԸܙײ͍ͯͨ͡Ұํɺ ಋೖ͢Δ͜ͱͰϝϯςφʔ͕গͳ͍ϓϩδΣΫτΛ૿͍ͯ͠ΔΑ͏ͳײ֮͋Γ·ͨ͠ ٯʹRubyͷνʔϜʹؔͯ͠ɺެࣜϥϯλΠϜ͕͋ΔͨΊ͔ Serverless͕গͣͭ͠ਁಁ͍ͯͨ͠ ࣾͷٕज़ελοΫͰ͋ΔPHPͱAWS
LambdaͷϥϯλΠϜͱͷϛεϚονͱ Serverlessͱ͍͏࣮ߦڥʹର͢Δೝෛՙ͕૾Ҏ্ʹେ͖͍ͷΛ࣮ײ࢝͠Ί͍ͯͨ
©Fusic Co., Ltd. 17 ServerlessΛద༻͢Δ͜ͱѱͳͷ͔
©Fusic Co., Ltd. 18 ඪΛݟ͢ 目 Serverless 入 用 Serverless
©Fusic Co., Ltd. 19 νʔϜʹϑΟοτͤ͞ΔServerless 3
©Fusic Co., Ltd. 20 PHPΛAWS Lambda্Ͱ͏͜ͱΛݕ౼ PHPΛಋೖ͢Δ͜ͱΛ2018͋ͨΓ͔Βݕ౼Λ࢝Ί͍ͯͨ ΧελϜϥϯλΠϜ͕ൃද͞ΕͨཌͷPHP Conference 2019ͷࢿྉʹͯ
ʮAWS LambdaΛPHPʹͯ͏ͨΊʹʯͱ͍͏ͱ͜ΖΛௐ͍ͯͨ
©Fusic Co., Ltd. 21 Laravel + Bref on AWS Lambda
ฐࣾͷจԽͱ͍͍ͯࠜͯ͠ΔPHP WebFrameworkͷLaravel AWSͱͷ૬ੑ͕ඇৗʹྑ͘ɺ .envʹAWSͷύϥϝʔλʔΛઃఆ͢Δ͚ͩͰAWSΛ্खʹѻ͏ࣄ͕Մೳ PHPͷOSSϓϩδΣΫτͰ͋ΔBref AWS Lambda্ͰPHPΞϓϦέʔγϣϯΛ؆୯ʹσϓϩΠͱཧΛՄೳʹ͢Δπʔϧ ͜ΕΒΛΈ߹ΘͤɺνʔϜͷٕज़ελοΫʹϑΟοτͤ͞Δ͜ͱ͕ॏཁͩͱߟ͑·ͨ͠
©Fusic Co., Ltd. 22 PHPΛAWS Lambda্ͰϓϩμΫγϣϯར༻Λ࣮ݱ AWS Dev Day 2022ʹͯϑϧServerlessʹͯఏڙ͍ͯ͠ΔαΠτͷΛ͠·ͨ͠
PHP+Laravelͱ͍͏ٕज़ελοΫʹϑΟοτͤ͞Δ͜ͱͰνʔϜͰಋೖͰ͖ͨࣄྫ https://speakerdeck.com/seike460/serverless-high-load-site-realized-with-amazon-s3-select
©Fusic Co., Ltd. 23 ͦͷޙผͷνʔϜͰಋೖ͢Δ͜ͱͰ͖ͨ AWS Lambda x PHPʹͯएखͷϝϯόʔ͕ߏங Laravelͷࣝ͋ͬͨҝɺීஈͷߏஙͷΑ͏ʹ
ࣗҎ֎ͷϝϯόʔʹߏஙͤ͞Δ͜ͱ͕Ͱ͖ͨ ϕʔε͑͞ߏஙग़དྷΕνʔϜͰͷಋೖͱӡ༻Մೳ
©Fusic Co., Ltd. 24 ҰํͰ
©Fusic Co., Ltd. 25 LambdaͷϞϊϦε Amazon Web Services ϒϩάͷʮOperating Lambda:
ΠϕϯτۦಈܕΞʔΩςΫνϟʹ͓͚ΔΞϯνύλʔϯ – Part 3ʯ ҎԼͷΑ͏ʹ৮ΕΒΕ͍ͯ·͢ɻ -LambdaͷϞϊϦε -ύοέʔδαΠζ -࠷খݖݶΛద༻͢Δͷ͕͍͠ -ΞοϓάϨʔυ͕ࠔ -อक͕ࠔ -ҎԼ֘͠ͳ͍ -ίʔυͷ࠶ར༻͕͍͠ɿLaravelಘҙ -ςετ͕͍͠ɿLaravelಘҙ ࢀߟURL:https://aws.amazon.com/jp/blogs/news/compute-operating-lambda-anti-patterns-in-event-driven-architectures-part-3/ Operating Lambda: ΠϕϯτۦಈܕΞʔΩςΫνϟʹ͓͚ΔΞϯνύλʔϯ – Part 3
©Fusic Co., Ltd. 26 The Lambda monolith ࢀߟURL : https://docs.aws.amazon.com/lambda/latest/operatorguide/monolith.html
ʮThe Lambda monolithʯ
©Fusic Co., Ltd. 27 ServerlessͷՁΛνʔϜͰڗडग़དྷΔ ʮAWS Lambdaͱͯ͠ϕετͰͳ͍ ɹͰߏஙɺӡ༻·ͰؚΊͨΞϓϦέʔγϣϯͱͯ͠ ɹνʔϜͱͯ͠ϕετͩͬͨʯͱߟ͑·ͨ͠ νʔϜͷจԽͱͯ͠ServerlessΛड͚ೖΕΔ͜ͱ͕ग़དྷͨ
©Fusic Co., Ltd. 28 ಛੑΛཧղ͠ɺݒ೦ʹର͢ΔέΞߦ͍༕͍Λແ͘͢ ύοέʔδαΠζʹΑΔύϑΥʔϚϯεྼԽ -> దٓνϡʔχϯάɺܭଌʹΑΓͳ͍͜ͱΛ֬ೝ ࠷খݖݶͷద༻ ->
ಉ͡ϓϩάϥϜΛΤϯυϙΠϯτΛ͚ͯఏڙ͢Δ͜ͱͰରԠ functions: web: handler: public/index.php runtime: php- 82 -fpm timeout: 28 events: - httpApi: '*' admin-web: handler: public/index.php runtime: php- 82 -fpm timeout: 28 role: api-admin-role events: - httpApi: method: '*' path: /admin
©Fusic Co., Ltd. 29 Monolith First Serverless Development ࢀߟURL :
https://speakerdeck.com/_kensh/monolith-first-serverless-development?slide=55 @_kensh ʮMonolith First Serverless Developmentʯ
©Fusic Co., Ltd. 30 খنͳ։ൃͳΒLambdalithબࢶͱ͍͏هࣄ ࢀߟURL : https://rehanvdm.com/blog/should-you-use-a-lambda-monolith-lambdalith-for-the-api ʮShould you
use a Lambda Monolith, aka Lambdalith, for your API?ʯ
©Fusic Co., Ltd. 31 ServerlessͷՁΛఏڙ͢ΔνʔϜʹϑΟοτͨ͠ߏ
©Fusic Co., Ltd. 32 νʔϜͱServerlessΛܨ͙ͨΊͷ Platform Engineeringͷઓ 4
©Fusic Co., Ltd. 33 Platform Engineeringͱ ・ 用 目
©Fusic Co., Ltd. 34 CNCF Platforms White Paper Serverless CNCF
White Paper
©Fusic Co., Ltd. 35 Platform Engineering Platform Engineering Platform Engineering
Meetup Serverless Meetup Osaka 自
©Fusic Co., Ltd. 36 Platform Engineering On Serverless URL :https://speakerdeck.com/_kensh/platform-engineering-on-serverless
@_kensh
©Fusic Co., Ltd. 37 νʔϜτϙϩδʔ : ・ , ・ .
ʮϓϥοτϑΥʔϜ։ൃνʔϜͷʮअຐʹͳΒͳ͍ʯΑ͏ʹ͢Δɻ ɹ։ൃνʔϜ͕։ൃ͢Δ্Ͱͷલఏ݅ΛͳΔ͘গͳ͘͢Δͷͩɻʯ ɹɹɹɹɹɹɹɹɹ→ೝෛՙͷݮ - ετϦʔϜΞϥΠϯυνʔϜ - ಛఆͷػೳʹϑΥʔΧεͨ͠νʔϜ -ϓϥοτϑΥʔϜνʔϜ -ڞ௨ͷαʔϏεπʔϧΛఏڙ͢ΔνʔϜ
©Fusic Co., Ltd. 38 ίϯΣΠͷ๏ଇɺٯίϯΣΠͷ๏ଇ ίϯΣΠͷ๏ଇ ৫͕ઃܭ͢ΔγεςϜɺͦͷ৫ͷίϛϡχέʔγϣϯߏ͕ө͞ΕͨͷʹͳΔ ٯίϯΣΠͷ๏ଇ ·͍͠γεςϜΞʔΩςΫνϟΛ࣮ݱ͢ΔͨΊʹɺ৫ߏΛͦΕʹ߹Θͤͯઃܭ͢Δ ΫϥυωΠςΟϒͳΞʔΩςΫνϟʹ߹Θͤͨ৫ߏʹมߋग़དྷΕΑ͍͕
ݱ࣮తʹࣗͷࡋྔͷൣғͰ৫ߏมߋ͍͕͔͔࣌ؒ͠͠Δ ίϯΣΠͷ๏ଇʹج͖ͮɺ৫ͷٕज़ελοΫ߹Θͤͨ ServerlessͳγεςϜΞʔΩςΫνϟΛఏڙ͢ΔPlatform EngineeringΛߟ͑Δ
©Fusic Co., Ltd. 39 AWSʹ͓͚ΔServerless Architectureͷදతͳߏ Serverless Architectureͷࣗવͳߏ ແཧʹͯΊΔ͜ͱೝෛՙʹܨ͕ΓServerlessͷਁಁʹܨ͕Βͳ͍
©Fusic Co., Ltd. 40 ฐࣾͷಘҙͳٕज़ελοΫΛΈ߹Θͤͨߏ ྨࣅͷฐ͕ࣾಘҙͳߏΛ࠶ߟ͢Δ ৫ߏɺνʔϜؒͷίϛϡχέʔγϣϯ͕ө͞Εͨೝෛՙ͕͍ߏ
©Fusic Co., Ltd. 41 Platform Engineering ͷEssenceͷద༻ ৫ߏɺίϛϡχέʔγϣϯ͕ө͞Εͨߏʹ Serverless ArchitectureଆΛϑΟοτͤ͞ʹ͍͘
ࠓ·Ͱഓͬͨݟͱฐࣾͷٕज़ελοΫΛ ༥߹ͤ͞ΔͨΊʹTiDB ServerlessΛ࠾༻ ΠϯλʔϑΣʔεͱͯ͠ɺ SQL͕͑Δ͜ͱͰࣗવʹ։ൃ͕Մೳ
©Fusic Co., Ltd. 42 ετϦʔϜΞϥΠϯυνʔϜͷ։ൃࣗવͳߏͰ ࠓ·Ͱͷ։ൃʹϑΟοτͤ͞ΔܗͰ։ൃڥΛDockerͰఏڙ Laravel + MySQL +
LocalStackΛར༻ͨࣗ͠વͳ։ൃߏ ҧײͷͳ͍ɺ͍ͭͷ։ൃମݧΛ࠶ݱ
©Fusic Co., Ltd. 43 ࢲୡͳΓͷPlatform Engineeringͷઓ ΞϓϦέʔγϣϯ։ൃऀ͕PlatformΛબͿ →ձࣾͷٕज़ελοΫʹ߹ΘͤͨPlatformΛඋͯࣗ͠વʹར༻ͯ͠Β͏ ࠓ·ͰServerlessͷ։ൃΛݗҾ͍ͯͨ͠ ͕ࣗࣗ։ൃʹҰՃΘΒͣਐḿ
Platform Engineering ͷతͷҰͭ ೝෛՙͷݮΛୡ
©Fusic Co., Ltd. 44 ϩάɺΨʔυϨʔϧɺCI/CDɺObservability URL :https://speakerdeck.com/_kensh/platform-engineering-on-serverless @_kensh ٕज़ελοΫʹ߹ΘͤPlatformΛඋ ߹ΘͤͯυΩϡϝϯςʔγϣϯߦ͏
ϩά CloudWatch Logs CI / CD GitHub Actions ServelessFramework ΨʔυϨʔϧ BiomeɺPHPStanɺPlaywright Dependabot Observability CloudWatchɺSentryɺSlack
©Fusic Co., Ltd. 45 νʔϜͱಉԽ͢ΔΑ͏ʹServerlessΛϑΟοτͤ͞Δ Serverless
©Fusic Co., Ltd. 46 αεςφϏϦςΟΛҙࣝͨ͠νʔϜͷద༻ ServerlessͷՁେ͖͍ ͨͩ͠νʔϜͷจԽΛແࢹͯ͠σϦόϦʔͷํ๏Λؒҧ͑Δͱ ଐਓԽͨ͠ෛͷҨ࢈ͱͳΔՄೳੑ͋Δ αεςφϏϦςΟΛҙࣝͨ͠ʮ͍·͋ΔνʔϜʹϑΟοτͤ͞ΔServerlessʯ
©Fusic Co., Ltd. 47 Thank You We are Hiring! https://recruit.fusic.co.jp/
͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠