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
Cloudflare Workers x AWS Lambdaの組み合わせユースケース / C...
Search
shiro seike
PRO
July 12, 2024
Programming
2
560
Cloudflare Workers x AWS Lambdaの組み合わせユースケース / Cloudflare Workers x AWS Lambda Combination Use Case
第36回 JAWS-UG札幌 勉強会【 #CloudflareUG_cts と合同開催です!】
https://jawsug-sapporo.connpass.com/event/321565/
shiro seike
PRO
July 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
2
720
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
230
AWS reInvent 2024サービスアップデートデモ / AWS reInvent 2024 Service Update Demo
seike460
PRO
0
28
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
580
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
1.2k
実践サーバーレスパフォーマンスチューニング ~その実力に迫る~ / Practical Serverless Performance Tuning ~A Close Look at its Power~
seike460
PRO
2
370
PHPを書く理由、PHPを書いていて良い理由 / Reasons to write PHP and why it is good to write PHP
seike460
PRO
5
630
AWS CDKを用いたセキュアなCI/CDパイプラインの構築 / Build a secure CI/CD pipeline using AWS CDK
seike460
PRO
3
770
いまあるチームにフィットさせる Serverless そして Platform Engineeringへの挑戦 / Serverless Fits the Team You Have and Platform Engineering
seike460
PRO
2
2.1k
Other Decks in Programming
See All in Programming
どうして手を動かすよりもチーム内のコードレビューを優先するべきなのか
okashoi
3
810
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
130
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
8
1.8k
Package Traits
ikesyo
1
130
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
220
テストコード書いてみませんか?
onopon
2
290
Оптимизируем производительность блока Казначейство
lamodatech
0
870
ATDDで素早く安定した デリバリを実現しよう!
tonnsama
1
1.1k
Effective Signals in Angular 19+: Rules and Helpers
manfredsteyer
PRO
0
340
103 Early Hints
sugi_0000
1
330
Fibonacci Function Gallery - Part 2
philipschwarz
PRO
0
200
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
390
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Docker and Python
trallard
43
3.2k
The Invisible Side of Design
smashingmag
299
50k
Unsuck your backbone
ammeep
669
57k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Faster Mobile Websites
deanohume
305
30k
Being A Developer After 40
akosma
89
590k
The Language of Interfaces
destraynor
155
24k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
How to Ace a Technical Interview
jacobian
276
23k
A Tale of Four Properties
chriscoyier
157
23k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
230
Transcript
©Fusic Co., Ltd. 1 Cloudflare Workers x AWS Lambdaͷ Έ߹ΘͤϢʔεέʔε
2024.07.12 @seike460 ୈ36ճ JAWS-UGࡳຈ ษڧձ ʲ #CloudflareUG_cts ͱ߹ಉ։࠵Ͱ͢ʂʳ
©Fusic Co., Ltd. 2 ਗ਼Ո ࢙ @seike460 AWS Community Builder
Serverless ίϛϡχςΟ JAWS-UG Fukuoka Cloudflare Meetup Fukuoka Serverless Meetup Fukuoka Fukuoka.php Fukuoka.go JP_Stripes Fukuoka ࣗݾհ ͡Ίʹ גࣜձࣾFusic ϓϦϯγύϧΤϯδχΞ/ΤόϯδΣϦετ
©Fusic Co., Ltd. 3 CONTENTS ࣍ 1. AWSʹ͓͚ΔαʔόʔϨεͷඪ४ߏ 2. Amazon
API Gatewayͷίετ 3. Cloudflare Workersͷར༻ 4. ͞ΒͳΔ͕Γ 5. ·ͱΊ
©Fusic Co., Ltd. 4 AWSʹ͓͚ΔαʔόʔϨεͷඪ४ߏ 1
©Fusic Co., Ltd. 5 Α͋͘Δߏ API Gateway͕ϦΫΤετΛड͚ͯ AWS Lambda͕ϦΫΤετΛॲཧ͢Δ ར༻͢Δʹશ͘ͳ͍͠
࣮͢Δ͏͑Ͱͷϋʔυϧ શ͘ߴ͘ͳ͍ͷͰ ඇৗʹඪ४తͳߏͩͱࢥ͍·͢
©Fusic Co., Ltd. 6 Amazon API Gatewayͷίετ 2
©Fusic Co., Ltd. 7 Amazon API GatewayҎ֎ʹߴ͍ ͍ͭ͜ͷجຊߏͰಈ͍͍ͯͨ APIʹ1000ສϦΫΤετ͕ ߦΘΕ͍ͯΔࣄྫʹͯ
શମίετͷͳΜͱ76.4%͕ Amazon API Gatewayͱ͍͏ ঢ়ଶʹͳ͍ͬͯͨ ͪΖΜنʹରͯ͠ ଟେͰͳ͍ͷ͕ͩɺͨΒཱͭ
©Fusic Co., Ltd. 8 Cloudflare Workersͷར༻ 3
©Fusic Co., Ltd. 9 ઌߦ࣮ ͦ͏͍͑1͋ͨΓ10ສ݅ͷ ϦΫΤετ͕ແྉ͕͋ΔFaaS͕ ͋Δͳͱࢥ͍ͭ͘ લճԬभͰ͓͜ͳΘΕͨ Cloudflare
Meet-up Fukuoka Vol.2 ʹͯ@melank͕ Cloudflare WokersͰHonoΛར༻ͨ͠ Routing࣮Λߦ͍ͬͯͨ
©Fusic Co., Ltd. 10 ࣮ΞʔΩςΫνϟ Cloudflare Woker͕ϦΫΤετΛड͚ͯ AWS LambdaʹͦͷϦΫΤετΛ͠ AWS
Lambda͕ϦΫΤετΛॲཧ͢Δ ͦͷॲཧ݁ՌΛCloudflare Woker͕ฦ͢
©Fusic Co., Ltd. 11 αΫοͱίʔυΛॻ͍ͯΈΔʢCloudflare Workersʣ Cloudflare WorkersଆͰ RequestΛड͚औͬͯ ͦͷRequestΛར༻ͯ͠
AWS LambdaΛݺͼग़࣮͢ ʢݺͼग़࣌͢Invoke͢Δʣ
©Fusic Co., Ltd. 12 ֦େʢCloudflare Workersʣ
©Fusic Co., Ltd. 13 αΫοͱίʔυΛॻ͍ͯΈΔʢAWS Lambdaʣ Cloudflare WorkersଆͰ RequestΛड͚औͬͯ ͦͷRequestΛར༻ͯ͠
AWS LambdaΛݺͼग़࣮͢ ʢݺͼग़࣌͢Invoke͢Δʣ
©Fusic Co., Ltd. 14 ֦େʢAWS Lambdaʣ
©Fusic Co., Ltd. 15 ύϑΥʔϚϯε Time per Request͕ 200msͳͷͰ ͔ͳΓݱ࣮తͳύϑΥʔϚϯε
ʢΉ͠Ζૣ͍ʣ 500 rpsͱ͍͏͜ͱͰ ฒྻੑ֬อ͞Ε͍ͯΔ API Gatewayͱͯ͠ेͳੑೳ
©Fusic Co., Ltd. 16 ύϑΥʔϚϯε
©Fusic Co., Ltd. 17 ͞ΒͳΔ͕Γ 4
©Fusic Co., Ltd. 18 API Gatewayʹ࣮Ͱ͖ͳ͍ػೳ࣮Մೳʹ Honoࣗମʹ༷ʑͳMiddlewareػߏΛ ఏڙ͍ͯ͠Δ ྫ͑JWTೝূɺCSRFରԠɺ StreamingDataରԠͳͲ
༷ʑͳػೳՃΛखܰʹ࣮ࢪग़དྷΔ Ͳ͏ͯ͠ߏஙͷίετΛͭ ඞཁ͋Δ͕ߏஙίετ͕༩͢Δ ՁΛڗड͢ΔʹબࢶʹͳΔ͔
©Fusic Co., Ltd. 19 ·ͱΊ 5
©Fusic Co., Ltd. 20 ·ͱΊ Α͋͘ΔAWSͷαʔόʔϨεߏͰҊ֎API Gatewayͷֹ͕͔͔ۚΔ Point 01 ίετ෦ͷղܾͱͯ͠Cloudflare
Wokers x AWS Lambda Point 02 ύϑΥʔϚϯε্ʑɺશ͘ͳ͑͘Δ Point 03 ΧελϚΠζੑʹັྗΛײ͡ΔͷͳΒબࢶʹͳΔ͔͠Εͳ͍ Point 04
©Fusic Co., Ltd. 21 Thank You We are Hiring! https://recruit.fusic.co.jp/
͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠