Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
470
とにかく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
340
PHPを書く理由、PHPを書いていて良い理由 / Reasons to write PHP and why it is good to write PHP
seike460
PRO
5
580
AWS CDKを用いたセキュアなCI/CDパイプラインの構築 / Build a secure CI/CD pipeline using AWS CDK
seike460
PRO
3
740
いまあるチームにフィットさせる 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
AWS X-Rayを利用したサーバーレスのパフォーマンス分析 / Serverless performance analysis using AWS X-Ray
seike460
PRO
2
180
Cloudflare Workers x AWS Lambdaの組み合わせユースケース / Cloudflare Workers x AWS Lambda Combination Use Case
seike460
PRO
2
520
Other Decks in Programming
See All in Programming
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
810
N.E.X.T LEVEL
pluu
2
270
Modular Monolith Monorepo ~シンプルさを保ちながらmonorepoのメリットを最大化する~
yuisakamoto
11
4k
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
3.7k
Seamless Flutter Native Integration: FFI & Pigeon - Dreamwalker (JaichangPark / 박제창) @FlutterKaigi2024
itsmedreamwalker
0
120
React + Tauriでデスクトップアプリ開発に入門してみた
ynishimura0922
0
210
Criando Commits Incríveis no Git
marcelgsantos
2
150
プロダクトの品質に コミットする / Commit to Product Quality
pekepek
1
690
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
130
似たもの同士のPerlとPHP
uzulla
1
110
MoQとか勉強会#2 発表資料
yuki_uchida
2
620
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
930
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
43
9.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
27
2.1k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
How GitHub (no longer) Works
holman
310
140k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Building Adaptive Systems
keathley
38
2.3k
How to train your dragon (web standard)
notwaldorf
88
5.7k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
260
Mobile First: as difficult as doing things right
swwweet
222
8.9k
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/
͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠