Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Hitchhiker's Guide to Serverless - Node Interac...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Steve Faulkner
November 29, 2016
Technology
94
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Hitchhiker's Guide to Serverless - Node Interactive
Steve Faulkner
November 29, 2016
More Decks by Steve Faulkner
See All by Steve Faulkner
Shipping TypeScript to npm
southpolesteve
2
410
Going Serverless with GraphQL
southpolesteve
1
90
Hitchhiker's Guide to Serverless @ QCon London
southpolesteve
0
52
Full Stack Serverless @ DevOps Days Boston
southpolesteve
0
48
Full Stack Serverless Applications @ MidwestJS
southpolesteve
0
230
Other Decks in Technology
See All in Technology
TinyGoでオブザーバビリティ?OpenTelemetryはTinyGoで使えるのか / Is OpenTelemetry available in TinyGo environment?
ymotongpoo
2
130
More Freedom on the Same Shared GPU Cluster: A Small Team’s Experience with vCluster
nttcom
0
140
自作バイナリを動かす「入口」8選
puhitaku
1
1.2k
不可逆な意思決定を避けながら10億超の顧客データを AI Ready にするデータ基盤設計
baseballyama
1
250
しろおびから始める!ログ活用の第一歩
shumei_ito
0
820
自分で立ててみるLLMサービス
y_sera15
0
150
子育てエンジニアの可処分時間が減っても成長を諦めない戦い方
sudoakiy
5
4.3k
Execution in the Kingdom of Agents: Reflections on Abstraction and Complexity
bcantrill
0
900
AI時代だからこそ推したい!Gitコマンド再入門
munakata
0
160
使いこなすために知っておきたい Azure SRE Agent アンチパターン
torumakabe
2
430
「事実」を「計測」して、「解釈」する 〜AWS Lambdaのメモリ最適解の見つけ方〜
maimyyym
0
120
SREでアラート疲れを 解決しよう!
kairim0
1
220
Featured
See All Featured
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
590
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
Utilizing Notion as your number one productivity tool
mfonobong
4
610
Paper Plane (Part 1)
katiecoart
PRO
2
11k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Designing Experiences People Love
moore
143
24k
Technical Leadership for Architectural Decision Making
baasie
3
600
Are puppies a ranking factor?
jonoalderson
2
4k
Color Theory Basics | Prateek | Gurzu
gurzu
1
480
How to build a perfect <img>
jonoalderson
1
6.1k
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