Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Hitchhiker's Guide to Serverless - Node Interac...
Search
Steve Faulkner
November 29, 2016
Technology
0
84
Hitchhiker's Guide to Serverless - Node Interactive
Steve Faulkner
November 29, 2016
Tweet
Share
More Decks by Steve Faulkner
See All by Steve Faulkner
Shipping TypeScript to npm
southpolesteve
2
380
Going Serverless with GraphQL
southpolesteve
1
80
Hitchhiker's Guide to Serverless @ QCon London
southpolesteve
0
45
Full Stack Serverless @ DevOps Days Boston
southpolesteve
0
41
Full Stack Serverless Applications @ MidwestJS
southpolesteve
0
220
Other Decks in Technology
See All in Technology
「Managed Instances」と「durable functions」で広がるAWS Lambdaのユースケース
lamaglama39
0
170
32のキーワードで学ぶ はじめての耐量子暗号(PQC) / Getting Started with Post-Quantum Cryptography in 32 keywords
quiver
0
290
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
0
670
21st ACRi Webinar - AMD Presentation Slide (Nao Sumikawa)
nao_sumikawa
0
230
法人支出管理領域におけるソフトウェアアーキテクチャに基づいたテスト戦略の実践
ogugu9
1
190
AI活用によるPRレビュー改善の歩み ― 社内全体に広がる学びと実践
lycorptech_jp
PRO
1
150
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
0
160
日本Rubyの会の構造と実行とあと何か / hokurikurk01
takahashim
4
800
「え?!それ今ではHTMLだけでできるの!?」驚きの進化を遂げたモダンHTML
riyaamemiya
10
4.6k
なぜフロントエンド技術を追うのか?なぜカンファレンスに参加するのか?
sakito
10
2k
Oracle Technology Night #95 GoldenGate 26ai の実装に迫る1
oracle4engineer
PRO
0
120
21st ACRi Webinar - Univ of Tokyo Presentation Slide (Ayumi Ohno)
nao_sumikawa
0
120
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Six Lessons from altMBA
skipperchong
29
4.1k
How STYLIGHT went responsive
nonsquared
100
5.9k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Code Review Best Practice
trishagee
73
19k
Documentation Writing (for coders)
carmenintech
76
5.2k
BBQ
matthewcrist
89
9.9k
Making Projects Easy
brettharned
120
6.5k
Mobile First: as difficult as doing things right
swwweet
225
10k
Transcript
The Hitchhiker’s Guide to “Serverless” Javascript Steve Faulkner, Bustle
Steve Faulkner @southpolesteve
None
None
None
Director of Platform Engineering
hype! serverless 101 why? why not? serverless @ bustle tools
None
The people who are serving websites on Lambda or something
are not only doing it wrong, they are wasting money while locking themselves in to an architecture that doesn't fit their app - @scrollaway on HN
doesn’t scale not production ready too slow too expensive
None
serverless for 99% of user requests
10-20 million calls per day
< 200ms
< $$$
Serverless 101
there are still servers…
…but what if we abstracted them away?
as a Service
Where does the business logic go?
None
None
Functions as a Service
run only when needed
pay only when running
don’t bother me with details
request myApp() response
None
None
None
re:invent happening right now…
app.get(‘/‘, sayHello) function sayHello(req,res){ res.end(‘hello!’) }
app.get(‘/‘, sayHello) function sayHello(req,res){ res.end(‘hello!’) }
app.get(‘/‘, sayHello) function sayHello(req,res){ res.end(‘hello!’) } Functions Routing
Functions-aaS + Routing-aaS
Lambda + API Gateway
Lambda
None
write code zip upload fn()
node java python
node shim + rust/go/haskell
function(event,context,cb){ cb(null, ‘Hello World’) }
versioning aliases RAM + CPU logging non-http events
API Gateway
None
click around a lot
cache/throttle authorization api keys logging/metrics custom domains ssl swagger import/export
why serverless?
None
ops
2011 startup ops: heroku down? get lunch!
2016 startup ops: have a plan
serverless ops: LOL! WAT SERVERS?
serverless ops: LOL! WAT SERVERS?
#noops
“serverless” ops: have a plan
benchmarks fallbacks load testing monitoring #lessops
scale scale scale scale scale scale scale scale scale scale
scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale scale
1 -> 1000 RPS
1000 -> 0 RPS
iteration
single function deployments
<1s deploys
$$$$
events API
ec2 ~$2500/mo
lambda api gateway ~$400/mo
why not?
lock in
const express = require(‘express’) const fn = require(./lambda-fn/) const app
= express() app.get('/', (req, res) => { fn.handler(null, null, (err, result) => { res.json(result) }) }); app.listen(3000)
cold functions
const data = loadBigData() // Takes 15s module.exports.handler = function(e,ctx,cb){
processBigData(data, cb) }
~3.5 hours - Eric @ iopipe.com
long tasks
5 min max
s3(3GB) Lambda Kinesis Firehose Elasticsearch
testing
test in the cloud?
None
frontend
None
API Gateway S3 Lambda(SSR) html + js
backend
None
API Gateway Lambda JSON dynamodb redis
tools!!!
serverless framework node-lambda apex claudia.js
None
npm install -g shep
JavaScript Only no CF,terraform swagger webpack environments
shep new my-api shep generate endpoint shep deploy production
coming soon… shep server shep docs shep logs —stream
questions? Steve Faulkner @southpolesteve