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
AWS Lambdaで実現するスケーラブルで低コストなWebサービス構築/YAPC::Hako...
Search
FUJIWARA Shunichiro
October 04, 2024
Technology
10
4.5k
AWS Lambdaで実現するスケーラブルで低コストなWebサービス構築/YAPC::Hakodate2024
YAPC::Hakodate 2024 前夜祭 rejectcon
FUJIWARA Shunichiro
October 04, 2024
Tweet
Share
More Decks by FUJIWARA Shunichiro
See All by FUJIWARA Shunichiro
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
9
1.1k
「最高のチューニング」をしないために / hack@delta 24.10
fujiwara3
21
4k
CEL(Common Expression Language)で書いた条件にマッチしたIAM Policyを見つける / iam-policy-finder
fujiwara3
2
1.5k
awslim - Goで実装された高速なAWS CLIの代替品を作った/layerx.go#1
fujiwara3
6
760
AWS CLIの起動が重くてつらいので aws-sdk-client-go を書いた / kamakura.go#6
fujiwara3
7
10k
コードを書く隙間を見つけて生きていく技術/Findy 思考の現在地
fujiwara3
31
7.1k
fujiwara-ware OSSをひたすら紹介する/ya8-2024
fujiwara3
8
810
Amazon ECSで好きなだけ検証環境を起動できるOSSの設計・実装・運用 / YAPC::Hiroshima 2024
fujiwara3
25
8.7k
Other Decks in Technology
See All in Technology
KubeCon NA 2024 Recap / Running WebAssembly (Wasm) Workloads Side-by-Side with Container Workloads
z63d
1
240
継続的にアウトカムを生み出し ビジネスにつなげる、 戦略と運営に対するタイミーのQUEST(探求)
zigorou
0
520
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
420
GitHub Copilot のテクニック集/GitHub Copilot Techniques
rayuron
24
11k
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.8k
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
300
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
170
コンテナセキュリティのためのLandlock入門
nullpo_head
2
320
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
180
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
watsonx.ai Dojo #5 ファインチューニングとInstructLAB
oniak3ibm
PRO
0
160
第3回Snowflake女子会_LT登壇資料(合成データ)_Taro_CCCMK
tarotaro0129
0
180
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Git: the NoSQL Database
bkeepers
PRO
427
64k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Code Reviewing Like a Champion
maltzj
520
39k
Gamification - CAS2011
davidbonilla
80
5.1k
We Have a Design System, Now What?
morganepeng
51
7.3k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
BBQ
matthewcrist
85
9.4k
Transcript
AWS LambdaͰ࣮ݱ͢Δ εέʔϥϒϧͰίετ ͳWebαʔϏεߏங YAPC::Hakodate 2024 @fujiwara ౻ݪढ़Ұ
@fujiwara ໘ന๏ਓΧϠοΫSREνʔ Ϝ ISUCON 1,2,5,11 ! ༏উ4ճ ISUCON 3,8,12ʙ14 ӡӦ(ग़)
github.com/kayac/ecspresso Amazon ECS σϓϩΠπʔϧ github.com/fujiwara/lambroll AWS Lambda σϓϩΠπʔϧ
Agenda • AWS Lambdaͷجຊ • طଘͷWebΞϓϦέʔγϣϯΛLambdaԽ͢Δ • Tonamelʹ͓͚ΔϚΠΫϩαʔϏεECS→LambdaҠߦࣄྫ • LambdaͰෳ։ൃڥαʔϏεϝογϡΛ࣮ݱ͢Δ
AWS Lambdaͷجຊ
AWS Lambdaͷجຊ FaaS = Function as a Service αʔόʔΛ͋Β͔͡Ί༻ҙͤͣɺΫϥυ্ʹσϓϩΠͨ͠ ʮؔʯΛ࣮ߦ͢ΔαʔϏε
ؔ=ʮೖྗΛड͚औͬͯ (ॲཧΛߦ͍) ग़ྗΛฦ͢ͷʯ use v5.40.0; sub sum ($a, $b) { return $a + $b; }
Lambda༻ͷ sum ؔͷྫ use v5.40.0; sub sum ($event, $context) {
my $a = $event->{a}; my $b = $event->{b}; return { sum => $a + $b }; } ͜ΕΛLambdaʹσϓϩΠ(ৄࡉུ)→ʮؔʯΛݺͼग़ͤΔ $ aws lambda invoke \ --function-name sum \ --payload '{"a":1, "b":2}' \ --cli-binary-format raw-in-base64-out \ /dev/stdout {"sum":3}
Lambdaͷ࣮ߦϞσϧ ΠϕϯτΛܖػʹϚΠΫϩVM(Firecracker1)͕ىಈ ΠϕϯτAWSͷ֤छαʔϏε͔Βൃੜ/खಈͰ࣮ߦՄೳ ՝࣮ۚߦ࣌ؒ(msec)ͱϝϞϦׂΓͯྔ(MB)ʹԠͯ͡ൃੜ ࣮ߦ͍ͯ͠ͳ͍ͱ͖՝ۚ͞Εͳ͍ 1VMಉ࣌ʹ1Πϕϯτͷॲཧ͔͠͠ͳ͍ ෳΠϕϯτ͕ಉ࣌ʹൃੜͨ͠ΒෳͷVM͕ࣗಈతʹىಈ͢Δ (εέʔϧΞτ) 1 https://github.com/firecracker-microvm/firecracker
WebΞϓϦέʔγϣϯΛLambdaԽ͢Δ WebΞϓϦέʔγϣϯαʔόʔ = ϦΫΤετΛड͚औͬͯϨεϙϯεΛฦ͢ = ʮؔʯͱಉ͡ LambdaԽ͢ΔϝϦοτ ࣮ߦ͍ͯ͠Δͱ͖͚ͩ՝ۚ ɹϦΫΤετ͕དྷͳ͍ͱ͖ʹίετθϩ ٸܹͳෛՙ૿ՃʹରԠ͍͢͠
ɹϦΫΤετ͕૿͑ͨΒࣗಈతʹεέʔϧΞτ
LambdaͰHTTPΛॲཧ͢ΔͨΊͷํ๏ 1. Amazon API Gateway 2. Application Load Balancer(ALB) 3.
Lambda Function URLs AWS͕༻ҙ͍ͯ͠ΔϚωʔδυͳͷ (ଞʹͰ͖Δ͕ޙड़)
Amazon API Gateway (2015ʙ) ϦΫΤετͷϧʔςΟϯάมɺೝূɺೝՄͳͲߴػೳ VPCʹઃஔՄɺLambdaҎ֎ͷόοΫΤϯυࢦఆͰ͖Δ Application Load Balancer(ALB) (2018ʙ)
ϩʔυόϥϯαʔͷλʔήοτͱͯ͠LambdaΛՃͰ͖Δ Path/ϔομϕʔεͰͷϧʔςΟϯά VPCʹઃஔՄɺίετଟগֻ͔Δ(ݻఆඅ༻) Lambda Function URLs (2022ʙ) Lambdaؔ/aliasʹ1:1ରԠͨ͠URLΛൃߦ(VPCෆՄ) ϧʔςΟϯάͰ͖ͳ͍ɺγϯϓϧɺίετ
LambdaͰHTTPϦΫΤετ GET /sum?a=1&b=2 HTTP/1.1 Host: example.com ↓͜ͷϦΫΤετΛLambda͕ड৴͢Δͱ͖ͷΠϕϯτ2 { "httpMethod": "GET",
"path": "/sum", "headers": {"Host": "example.com"}, "queryStringParameters": {"a": "1", "b": "2"}, } 2 (Πϝʔδ) API GW(v1,v2), ALB, Function URLͰΠϕϯτͷܗࣜඍົʹҟͳΔ
LambdaͰHTTPϨεϙϯε { "statusCode": 200, "headers": {"Content-Type": "application/json"}, "body": "{\"sum\":3}" }
↓͜ͷϨεϙϯεΛLambda͕ฦ͢ͱ HTTP/1.1 200 OK Content-Type: application/json {"sum":3}
͜ΕΛશ෦ࣗͰॲཧ͢Δͱ… sub handler ($event, $context) { my $path = $event->{path};
if ($path eq '/sum') { # pathͷϧʔςΟϯάॲཧ my $a = $event->{queryStringParameters}->{a}; my $b = $event->{queryStringParameters}->{b}; # ϨεϙϯεΛฦ͢ return { statusCode => 200, headers => {'Content-Type' => 'application/json'}, body => encode_json({ sum => $a + $b }), }; } return { statusCode => 404, headers => { 'Content-Type' => 'text/plain' }, body => 'Not Found', }; }
ϑϨʔϜϫʔΫΛ͍͍ͨ ͍·Ͳ͖ϧʔςΟϯάϨεϙϯεੜΛࣗͰॻ͖ͨ͘ͳ͍ use Kossy; get '/sum' => sub ($self, $c)
{ my $a = $c->req->param('a'); my $b = $c->req->param('b'); return $c->render_json({ sum => $a + $b }); }; ͜Ε͚ͩͰࡁΉ
طଘͷWebΞϓϦέʔγϣϯΛLambdaԽ͢Δ
HTTPϦΫΤετ/Ϩεϙϯε㱻LambdaͷΠϕϯτ ͜ͷม͕Ͱ͖ΕैདྷͷϑϨʔϜϫʔΫΛͦͷ··͑Δʂ Perlͷ߹ AWS::Lambda::PSGI Λ͑؆୯ use AWS::Lambda::PSGI; my $app =
require "$ENV{'LAMBDA_TASK_ROOT'}/app.psgi"; my $func = AWS::Lambda::PSGI->wrap($app); sub handle { return $func->(@_); }
Goͷ߹ fujiwara/ridge3 (2016ʙ) import "github.com/fujiwara/ridge" func main() { var mux
= http.NewServeMux() mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { io.WriteString(w, "Hello") } ridge.Run(":8080", "/", mux) } Goͷඪ४ net/http ͷϋϯυϥΛͦͷ··͑Δ Lambda্ͰؔɺଞͷڥͰHTTPαʔόͱͯ͠ಈ࡞ ίʔυมߋ͢Δඞཁ͕ͳ͍(=ಉ͡όΠφϦͰOK) 3 https://github.com/fujiwara/ridge
ެࣜ awslabs/aws-lambda-go-api-proxy4 (2018ʙ) import "github.com/aws/aws-lambda-go/lambda" import "github.com/awslabs/aws-lambda-go-api-proxy/httpadapter" func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { io.WriteString(w, "Hello") }) lambda.Start(httpadapter.New(http.DefaultServeMux).ProxyWithContext) } ࣮ߦڥΛࣗಈผ͠ͳ͍ɻhttpαʔόΛىಈ͢Δʹ ࣗͰผ or main(όΠφϦ)Λ͚Δ 4 https://github.com/awslabs/aws-lambda-go-api-proxy
͏ҰͭͷΞϓϩʔν AWS Lambda Web Adapter5 (2021ʙ) LambdaؔͰextension(αΠυΧʔ)ͱͯ͠ಈ࡞ طଘͷWebΞϓϦέʔγϣϯΛී௨ͷαʔόʔͱͯ͠ىಈ LWA͕LambdaͷΠϕϯτड৴→localhostHTTPϦΫΤετ ϨεϙϯεΛLambdaͷϨεϙϯεʹมͯ͠ฦ͢
ίʔυʹखΛೖΕͣʹɺैདྷͷWebΞϓϦέʔγϣϯΛLambda ্Ͱಈ͔͢͜ͱ͕Ͱ͖Δ 5 https://github.com/awslabs/aws-lambda-web-adapter
https://aws.amazon.com/jp/builders-flash/202301/lambda-web- adapter/ ΑΓҾ༻
Tonamelʹ͓͚ΔECS→LambdaҠߦࣄྫ
Tonamel tonamel.com ΧϠοΫ͕։ൃɾӡӦ͍ͯ͠ΔeεϙʔπେձࢧԉαʔϏε
τʔφϝϯτͬͯԿʁ ී௨ͷਓ͕૾͢Δʮτʔφϝϯτʯ=ʮߕࢠԂͷ͋Εʯ ӳޠతʹʮτʔφϝϯτʯ=ʮେձʯ ࣮ଞͷʮτʔφϝϯτʯܗࣜ͋Δ
τʔφϝϯτܗࣜ - উͪΓઓ γϯάϧΠϦϛωʔγϣϯ ⭐ 6 ɹ1ճෛ͚ͨΒऴΘΓ ɹຊޠͰ୯ʹʮτʔφϝϯτʯͱݴͬͨΒେ͜Ε μϒϧΠϦϛωʔγϣϯ ⭐
ɹ2ճෛ͚ͨΒऴΘΓɺ1ճෛ͚ͨΒഊऀαΠυʹ·ΘΔ ɹΦϦϯϐοΫͷॊಓมଇμϒϧΠϦϛωʔγϣϯ εςοϓϥμʔ ϓϩٿΫϥΠϚοΫεγϦʔζͷ͋Ε 6 ⭐ TonamelͰαϙʔτ͍ͯ͠Δܗࣜ
τʔφϝϯτܗࣜ - άϧʔϓઓ ૯ͨΓઓ ɹશһ͕શһͱରઓ͢Δ ɹϓϩٿJϦʔάͷϦʔάઓ εΠευϩʔ ⭐ ɹશͯͷࢀՃऀ͕΄΅ಉ͡ࢼ߹ʹͳΔΑ͏ʹରઓ͢Δ ɹ΄΅ಉ͡ઓͷࢀՃऀಉ͕࢜ରઓ͢ΔΑ͏ʹΈ߹Θͤ(ෳ
ࡶ) TonamelΛ͏ͱෳࡶͳεΠευϩʔ؆୯ʹ։࠵Ͱ͖Δ
TonamelͷΞʔΩςΫνϟ 2017 ϦϦʔε Amazon EC2 + Perl + MySQL(Aurora) +
Redis(ElastiCache) ͍ΘΏΔී௨ͷϞϊϦγοΫWebΞϓϦέʔγϣϯ 2020 EC2 → ECS & GoͰϚΠΫϩαʔϏε ຊମͷWebΞϓϦέʔγϣϯ(Perl)ͷػೳΛ GoͰ࣮͞ΕͨϚΠΫϩαʔϏεʹҠߦ͍ͯ͘͠ ৽ػೳجຊతʹGoͰ࣮ վम͍ܰ͘͝ͷͳΒPerlͰɺେ͖͍ͷGoͰ
ݱࡏ10Ҏ্ͷϚΠΫϩαʔϏε͕Քಇத 7 ΞΧϯτ,ηογϣϯ,νϟοτ,௨ τʔφϝϯτදཧ (ECS→Lambda) େձཧ εϙϯαʔཧ ՝ۚཧ ۚϓʔϧཧ ֎෦API
webhook etc... 7 https://speakerdeck.com/mackee/the-migrating-to-microservices-in-go-from- monolith-in-perl
TonamelͷαʔϏεಛੑ ීஈͦ͜·ͰΞΫηε͕ଟ͘ͳ͍͕ େձ͕։࠵͞ΕΔͱٸܹʹϦΫΤετ͕૿Ճ τʔφϝϯτදཧαʔϏεͷAPIϦΫΤετ(2Ͱ20ഒ)
༧ଌΦʔτεέʔϧ ෛՙैͷΦʔτεέʔϧͰରԠͰ͖ͳ͍ͨΊ υϝΠϯࣝΛݩʹෛՙΛ༧ଌͯ͠ࣄલεέʔϧ͢Δ8 େձ͕։࠵͞ΕΔ࣌ɺنࣄલʹ͔Δ(DBʹ͋Δ) աڈͷσʔλ͔Βओ࠵ऀஂମผʹΛֻ͚ͯෛՙΛ༧ଌ (ਓؾͷ͋ΔஂମࢀՃऀҎ֎ͷӾཡऀଟ͍) 30͝ͱʹ࣍ͷ30ؒͷෛՙΛ༧ଌͯ͠εέʔϧΞτ 8 https://techblog.kayac.com/tonamel-spike-access
༧ଌ༧ଌͳͷͰ֎ΕΔ(͜ͱ͕͋Δ) աখʹ༧ଌ → ෛՙʹ͑ΒΕͣʹো Ұ൪ར༻ऀ͕͍͍ͨλΠϛϯάͳͷͰαʔϏεͷՁԼ աʹ༧ଌ → ༨Ϧιʔε͕ແବͳίετʹ ࣮ࡍʹ2024લͰෛՙैʹࣦഊͨ݁͠Ռ ฏۉͰ݄ʹ1ճఔͷো͕ൃੜ͍ͯͨ͠
ECS → LambdaͰղܾ? ίετݮͱෛՙैੑͷ্ͷͨΊ τʔφϝϯτදཧαʔϏεΛ ECS → LambdaʹҠߦ 20247݄ʹҠߦޙ ෛՙैʹࣦഊͨ݁͠Ռͷোͳ͠!
ίετͷେ෯ݮʹޭ !
ECS → Lambda ҠߦͰͬͨ͜ͱ net/http.Server → fujiwara/ridge αΠυΧʔͷॲཧΛ֎ʹग़͢ Fluentd: ϩάసૹ
katsubushi: IDൃߦϛυϧΣΞ ΞϓϦέʔγϣϯͷίʔυࣗମมߋͳ͠ पล෦ͷΈͷมߋͰLambdaʹҠߦͰ͖ͨ
FluentdͷҠߦ ECSͰFirelensͰFluentd→Kinesis Data Streamsʹૹ৴ ϩάॲཧج൫ͷ߹্ɺ͜ͷߏେ͖͘ม͑ͮΒ͍ ଞͷECSαʔϏεͰಈ͍͍ͯΔFluentdʹ in_http ΛՃ Internal ALBͷλʔήοτͱͯ͠ΈࠐΈ
LambdaͷϦΫΤετॲཧͷ࠷ޙʹόοϑΝͨ͠stdoutΛ FluentdʹHTTPͰૹ৴͢Δ
katsubushi ͷҠߦ github.com/kayac/go-katsubushi Int64ͷIDΛൃߦ͢ΔϛυϧΣΞ DBͷauto incrementΛΘͣʹߴʹ int64ͷҰҙͳIDΛൃߦ͢Δ memcached protocol(text/binary) HTTP,
gRPC ʹରԠ ʲࢀߟʳYAPC::Fukuokaͷൃද9,blog10 10 https://techblog.kayac.com/katsubushi-introduction.html 9 https://speakerdeck.com/fujiwara3/katsubushi
Before → After ઐ༻ECSαʔϏε࡞͍ͬͯͳ͍ (ଞͷαʔϏεͷαΠυΧʔΛڞ༻)
Ҡߦखॱ Internal ALBͷλʔήοτͱͯ͠ECSͱLambdaΛ྆ํՃ ՃॏϧʔςΟϯάͰঃʑʹτϥϑΟοΫΛҠߦ Lambda:ECS = 10:90 → 50:50 →
100:0 ண ෛՙ͕૿Ճͨ͠λΠϛϯάͰCold Start͕ൃੜ͢Δͣ ͜ͷλΠϛϯάͰϨΠςϯγ͕૿Ճ͢ΔՄೳੑ͕͋Δ͕…? ⭕ ϩάͰ1ඵҎͰىಈͰ͖͍ͯΔ ⭕ ALBܦ༝ͰͷϨΠςϯγͳ͠
None
σϓϩΠҠߦ ECS → Lambda ECSͷσϓϩΠ kayac/ecspresso11 Ͱ౷Ұ͍ͯ͠Δ ECSͷλεΫఆٛαʔϏεͷఆٛΛJSON/JsonnetͰཧ ECSͷΈΛରͱ͍ͯ͠Δ ɹଞͷϦιʔεͷཧTerraformͰ
ɹઃఆϑΝΠϧ͔ΒtfstateΛࢀরͯ͠IDͳͲΛղܾͰ͖Δ 11 github.com/kayac/ecspresso
LambdaͷσϓϩΠ LambdaͷσϓϩΠ fujiwara/lambroll12 Ͱ LambdaؔͷઃఆΛJSON/JsonnetͰཧ ɹίʔυzipԽͯ͠Ξοϓϩʔυͯ͘͠ΕΔ / Imageαϙʔτ LambdaͷΈΛର ɹଞͷϦιʔεͷཧTerraformͰ
ɹઃఆϑΝΠϧ͔ΒtfstateΛࢀরͯ͠IDͳͲΛղܾͰ͖Δ 12 github.com/fujiwara/lambroll
ecspresso & lambroll ͍উख/πʔϧ͕ཧ͢Δൣғ͕΄΅ಉ͡ ECSͱLambdaΛಉ࣌ʹѻͬͯҧײ͕ͳ͍ ͳͥͳΒ࡞ऀ͕ಉ͔ͩ͡Β… CircleCIͷσϓϩΠύΠϓϥΠϯʹlambrollΛΈࠐΈ ECSͱҰॹʹσϓϩΠ
ෳ։ൃڥαʔϏεϝογϡΛ࣮ݱ͢Δ
։ൃ/ϓϨϏϡʔڥ? ։ൃ࣌ ridge / AWS::Lambda::PSGIΛ͑ ͦͷ··ϩʔΧϧͰಈ͔ͤΔ ϓϨϏϡʔڥ ECSͰ mirage-ecs acidlemon/mirage-ecs13
ECSͰ͖ͳ͚ͩ։ൃڥΛ࡞ΕΔ ڥ͝ͱʹURLΛൃߦͯ͠ϧʔςΟϯά (proxy)ͯ͘͠ΕΔϛυϧΣΞ14 14 https://speakerdeck.com/fujiwara3/yapc-hiroshima-2024 13 github.com/acidlemon/mirage-ecs
LambdaͰϓϨϏϡʔڥ ࡞Γ·ͨ͠ fujiwara/lamux15 Lambda multiplexer URLͰaliasΛผͯ͠invoke͢Δ foo.example.com → invoke alias=foo
bar.example.com → invoke alias=bar ݺͼग़͠ઌͷؔHTTPॲཧ͢Δલఏ (ෳؔͷinvokeʹରԠ) 15 https://github.com/fujiwara/lamux
LamuxͰService Mesh lamuxextensionͱͯ͠ಈ࡞͢Δ extensionͱͯ͠ಈ࡞͢Δ߹ 1.LambdaͷΠϯελϯε্Ͱlisten 2.HTTPϦΫΤετΛड৴ͯ͠ଞͷؔ/ aliasΛInvoke foo.sv1.example.com → invoke
sv1:foo bar.sv2.example.com → invoke sv2:bar = αʔϏεϝογϡͷσʔλϓϨʔϯ ίϯτϩʔϧϓϨʔϯLambdaࣗମ
Lamux ͷ࣮ྫ perlbatross.kayac.com ΧϠοΫఏڙͷίʔυΰϧϑاը Perlbatross16 WebAppLambdaͰಈ࡞ Perl / Kossy /
AWS::Lambda::PSGI / Aurora PostgreSQL ίϯςφΠϝʔδͰLambdaʹσϓϩΠ 16 https://perlbatross.kayac.com/
ίʔυΰϧϑ=ҙίʔυ࣮ߦ WebAppͷLambdaͰ࣮ߦͨ͘͠ͳ͍ ίʔυ࣮ߦ༻ؔΛඇVPCʹஔ (֎෦ͷ௨৴શͯःஅ͓ͯ͘͠) webapp͔Βlamuxܦ༝Ͱݺͼग़͢ (HTTP) αʔϏεؒ௨৴ΛHTTPʹ͓͚ͯ͠ LambdaͰखݩͰ(ECSͰ) ಉ͡Α͏ʹಈ࡞͢Δ
࠷ޙʹ طଘͷWebΞϓϦέʔγϣϯΛLambdaԽ͢Δͷ͘͠ͳ͍ LambdaԽ͢ΔϝϦοτ - ٸܹͳෛՙ૿ՃʹରԠ͍͢͠ - ࣮ߦ͍ͯ͠ͳ͍ͱ͖ίετθϩ (ࠓճॻ͍ͯͳ͍͚Ͳ)͔ͳ͍αʔϏε͋Δ - IO(ωοτϫʔΫ)͕ͪଟ͍ͱίεύ͕ѱ͍
- ΞΫηεͷ૿ݮ͕গͳ͍αʔϏεͩͱׂߴ - ҆ఆͨ͠ϨΠςϯγ(1ܻmsec)͍͠