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
1.9k
いまあるチームにフィットさせる 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
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
860
実践サーバーレスパフォーマンスチューニング ~その実力に迫る~ / Practical Serverless Performance Tuning ~A Close Look at its Power~
seike460
PRO
2
320
PHPを書く理由、PHPを書いていて良い理由 / Reasons to write PHP and why it is good to write PHP
seike460
PRO
5
560
AWS CDKを用いたセキュアなCI/CDパイプラインの構築 / Build a secure CI/CD pipeline using AWS CDK
seike460
PRO
3
700
いまあるチームにフィットさせる Serverless / Serverless fits in with the team you have now.
seike460
PRO
2
170
地方こそサーバーレス! チームにフィットさせるサーバーレス / Rural areas are serverless! Serverless to Fit Your Team
seike460
PRO
1
110
AWS X-Rayを利用したサーバーレスのパフォーマンス分析 / Serverless performance analysis using AWS X-Ray
seike460
PRO
2
170
Cloudflare Workers x AWS Lambdaの組み合わせユースケース / Cloudflare Workers x AWS Lambda Combination Use Case
seike460
PRO
2
500
Other Decks in Programming
See All in Programming
Macとオーディオ再生 2024/11/02
yusukeito
0
370
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
現場で役立つモデリング 超入門
masuda220
PRO
15
3.2k
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
ヤプリ新卒SREの オンボーディング
masaki12
0
130
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
330
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
330
Jakarta EE meets AI
ivargrimstad
0
140
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
最新TCAキャッチアップ
0si43
0
140
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Thoughts on Productivity
jonyablonski
67
4.3k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
How to train your dragon (web standard)
notwaldorf
88
5.7k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Why Our Code Smells
bkeepers
PRO
334
57k
We Have a Design System, Now What?
morganepeng
50
7.2k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
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/
͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠