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
600
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
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
110
(再)ひとり技術広報からの脱却 / Re:Breaking away from one-man technical public relations
seike460
PRO
1
130
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
870
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
260
AWS reInvent 2024サービスアップデートデモ / AWS reInvent 2024 Service Update Demo
seike460
PRO
0
42
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
610
とにかく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
380
PHPを書く理由、PHPを書いていて良い理由 / Reasons to write PHP and why it is good to write PHP
seike460
PRO
5
650
Other Decks in Programming
See All in Programming
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
1
530
ARA Ansible for the teams
kksat
0
150
GoとPHPのインターフェイスの違い
shimabox
2
170
バックエンドのためのアプリ内課金入門 (サブスク編)
qnighy
8
1.8k
Linux && Docker 研修/Linux && Docker training
forrep
24
4.5k
ISUCON14公式反省会LT: 社内ISUCONの話
astj
PRO
0
190
チームリードになって変わったこと
isaka1022
0
190
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
730
自分ひとりから始められる生産性向上の取り組み #でぃーぷらすオオサカ
irof
8
2.7k
AWSマネコンに複数のアカウントで入れるようになりました
yuhta28
2
160
SpringBoot3.4の構造化ログ #kanjava
irof
2
980
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
2
310
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
Bash Introduction
62gerente
610
210k
Side Projects
sachag
452
42k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Adopting Sorbet at Scale
ufuk
74
9.2k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
31
2.1k
BBQ
matthewcrist
86
9.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
9
430
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
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/
͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠