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
Hitchhiker's Guide to Serverless @ QCon London
Search
Steve Faulkner
March 21, 2017
51
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Hitchhiker's Guide to Serverless @ QCon London
Steve Faulkner
March 21, 2017
More Decks by Steve Faulkner
See All by Steve Faulkner
Shipping TypeScript to npm
southpolesteve
2
410
Going Serverless with GraphQL
southpolesteve
1
83
Hitchhiker's Guide to Serverless - Node Interactive
southpolesteve
0
92
Full Stack Serverless @ DevOps Days Boston
southpolesteve
0
46
Full Stack Serverless Applications @ MidwestJS
southpolesteve
0
230
Featured
See All Featured
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
200
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
480
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
290
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.3k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
750
Context Engineering - Making Every Token Count
addyosmani
9
1k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.5k
Writing Fast Ruby
sferik
630
63k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
370
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Transcript
The Hitchhiker’s Guide to “Serverless” JavaScript
Steve Faulkner @southpolesteve
None
None
Director of Engineering
“Serverless”
None
“Serverless”
there are still servers…
servers platforms!
* as a Service
Database-aaS Caching-aaS Logging-aaS Metrics-aaS Servers-aaS
business logic?
Functions-aaS
myApp(request) #=> response
None
None
None
Lambda + API Gateway
Functions-aaS + Routing-aaS
$ per request
scales magically*
Lambda
write code zip upload function()
node java python C#
shim + rust/go/haskell
function(event,context,cb){ cb(null, ‘Hello World’) }
versioning aliases RAM + CPU logging non-http events
API Gateway
swagger or click a lot
cache/throttle authorization api keys logging/metrics custom domains ssl
None
10-20 million calls per day
< $$$
None
frontend
None
API Gateway S3 Lambda(SSR) html + js
Ember
Ember Riot
Ember Riot Preact
why preact?
components simple small
backend
graphiql.bustle.com
API Gateway Lambda JSON dynamoDB redis*
Ruby
Ruby JS (REST)
Ruby JS (REST) Purescript
None
Ruby JS (REST) Purescript JS (GraphQL)
why graphQL?
graphiQL
types
field resolution
dataloader
why serverless?
ops
#noops
#noops
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
$$$$
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) }
long tasks
5 min max
s3(3GB) Lambda Kinesis Firehose Elasticsearch
testing
test in the cloud?
tools!
serverless framework node-lambda apex claudia.js
None
npm install -g shep
JavaScript Only no CF swagger webpack environments
shep new my-api shep generate endpoint shep deploy production
questions? Steve Faulkner @southpolesteve