SlideShare a Scribd company logo
A Gentle Introduction to
Functions-as-a-Service
Valeri Karpov
@code_barbarian
github.com/vkarpov15
About Me
● Backend Lead @ Booster, Node.js OSS
● Core contributor for Mongoose, Mocha
● Blogger, thecodebarbarian.com
● Early employee at LevelUp, MongoDB, Booster
● Invented the MEAN stack
What’s This Talk About?
● The progression of dev-ops for startups
● Why FaaS is the next natural step for dev-ops
● Retaining state in “stateless” functions
● Trade-offs between different FaaS providers
2008: Physical Machine in Dorm Room
● EC2 was limited, other hosting services sucked
● LevelUp’s first release on an Ubuntu tower
○ Physical machines die or get shut down
○ Campus ISP is slow or changes the IP
○ Limited scale: shipping a new PC takes days
2012: Amazon EC2
● My next few startups all ran on 1-5 EC2 VMs
● Cloud VMs solve most physical machine issues
○ Power outages much less likely
○ Reliable internet maintained by Amazon
○ Spinning up a new VM takes minutes
2012: Amazon EC2
● Vanilla EC2 was great for single server apps
● But what about multiple app servers?
○ 2 services on the same VM in isolation
○ Continuous Deployment
○ Scaling horizontally with a click
2015: Containers and Orchestration
● Docker, Mesos, Kubernetes, etc.
● Compelling for CD and isolation
● Still Have Problems with Resource Usage
○ Memory limits per VM
○ Docker hogs disk space
Functions as a Service
● Instead of deploying an app, you deploy a
bunch of stateless functions
● No VMs, no OS updates
● Resource limits (RAM, CPU) per function call
● Functions run in response to triggers
API Gateways
● Cloud functions respond to triggers
● HTTP is a trigger, but what about:
○ API keys / auth
○ Rate limits
● FaaS providers have API Gateways for this
FaaS Providers
● Amazon AWS Lambda
● Microsoft Azure Functions
● Google Cloud Functions
● IBM Cloud Functions
● Oracle Cloud Fn
● LunchBadger, + many more
FaaS Open Source Libraries
● Kubeless
● OpenWhisk
● Fission
FaaS Advantages
● Easier to scale, no need to worry about too
much load on one service
● Cheaper for low-usage services
● Cheap and easy development environments
● Resource issues rare and easy to debug
FaaS Problems
● No strong best practices yet
● Completely different way of writing apps
● Limited language support
● Managing triggers and API Gateways
● Sometimes you want to retain state...
Why Retain State?
● Think about a persistent database connection
Stateless is a Big Performance Problem
● Connecting to a database on every function
call is slow
But You Can Retain Global State
● Put db handle in global scope
Common Trick Across FaaS Providers
● AWS Lambda: bit.ly/mongodb-lambda
● Azure Functions: bit.ly/mongodb-azure
○ Also With C#: bit.ly/csx-azure-state
● IBM Cloud: bit.ly/mongodb-ibm-cloud
Trade-offs Between Popular Providers
● AWS Lambda
● Azure Functions
● Google Cloud Functions
Size Restrictions
● Size limit per function (node_modules)
○ AWS Lambda: 50MB
○ Azure Functions: None (*)
○ Google Cloud: 100MB zipped, 500MB
unzipped
Primary Fee Structure
● AWS Lambda: $0.00001667 / GB-s, $0.20 / 1M
● Azure Functions: $0.000016 / GB-s, $0.20 / 1M
● Google Cloud: $0.0000025 / GB-s, $0.0000100
/ GHz-s
Hidden Fees: API Gateways
● AWS Lambda: $3.50 / 1M + data
● Azure Functions: no extra cost necessary
● Google Cloud Functions: no extra cost
necessary
Overall FaaS Recommendations
● Check out Azure Functions
● AWS Lambda and IBM Cloud are a mess
Further Reading
● My Blog:
○ bit.ly/mongodb-azure
○ bit.ly/mongodb-ibm-cloud
Thanks for Listening!
Ad

More Related Content

What's hot (20)

ReactPHP + Symfony
ReactPHP + SymfonyReactPHP + Symfony
ReactPHP + Symfony
David Bergunder
 
What's new in ASP.NET vNext
What's new in ASP.NET vNextWhat's new in ASP.NET vNext
What's new in ASP.NET vNext
Gunnar Peipman
 
Technology Stack Discussion
Technology Stack DiscussionTechnology Stack Discussion
Technology Stack Discussion
Zaiyang Li
 
Teaching Cloud to the Programmers of Tomorrow
Teaching Cloud to the Programmers of TomorrowTeaching Cloud to the Programmers of Tomorrow
Teaching Cloud to the Programmers of Tomorrow
Mike Crabb
 
Building real time app by using asp.Net Core
Building real time app by using asp.Net CoreBuilding real time app by using asp.Net Core
Building real time app by using asp.Net Core
Commit Software Sh.p.k.
 
Moving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScaleMoving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScale
mmoline
 
Javascript Myths and its Evolution
Javascript Myths and its  EvolutionJavascript Myths and its  Evolution
Javascript Myths and its Evolution
Deepu S Nath
 
Beyond Apache: Faster Web Servers
Beyond Apache: Faster Web ServersBeyond Apache: Faster Web Servers
Beyond Apache: Faster Web Servers
webhostingguy
 
Rails on JRuby
Rails on JRubyRails on JRuby
Rails on JRuby
Rob C
 
CDN implmentation consideration
CDN implmentation considerationCDN implmentation consideration
CDN implmentation consideration
Avi Shalisman
 
Building & Testing Scalable Rails Applications
Building & Testing Scalable Rails ApplicationsBuilding & Testing Scalable Rails Applications
Building & Testing Scalable Rails Applications
evilmike
 
Real-world Experiences in Scala
Real-world Experiences in ScalaReal-world Experiences in Scala
Real-world Experiences in Scala
Amir Karimi
 
Cassandra Summit 2014: Deploying Cassandra for Call of Duty
Cassandra Summit 2014: Deploying Cassandra for Call of DutyCassandra Summit 2014: Deploying Cassandra for Call of Duty
Cassandra Summit 2014: Deploying Cassandra for Call of Duty
DataStax Academy
 
Scaling a Web Service
Scaling a Web ServiceScaling a Web Service
Scaling a Web Service
Leon Ho
 
Orchestrator for QlikView: add-on product description
Orchestrator for QlikView: add-on product descriptionOrchestrator for QlikView: add-on product description
Orchestrator for QlikView: add-on product description
Marco Zampieri
 
ASP.NET Scalability - VBUG London
ASP.NET Scalability - VBUG LondonASP.NET Scalability - VBUG London
ASP.NET Scalability - VBUG London
Phil Pursglove
 
Open source and cross platform .net
Open source and cross platform .netOpen source and cross platform .net
Open source and cross platform .net
Ibon Landa
 
GraphQL vs. (the) REST
GraphQL vs. (the) RESTGraphQL vs. (the) REST
GraphQL vs. (the) REST
coliquio GmbH
 
FULL stack -> MEAN stack
FULL stack -> MEAN stackFULL stack -> MEAN stack
FULL stack -> MEAN stack
Ashok Raj
 
Nodeconf npm 2011
Nodeconf npm 2011Nodeconf npm 2011
Nodeconf npm 2011
Florent Jaby ヅ
 
What's new in ASP.NET vNext
What's new in ASP.NET vNextWhat's new in ASP.NET vNext
What's new in ASP.NET vNext
Gunnar Peipman
 
Technology Stack Discussion
Technology Stack DiscussionTechnology Stack Discussion
Technology Stack Discussion
Zaiyang Li
 
Teaching Cloud to the Programmers of Tomorrow
Teaching Cloud to the Programmers of TomorrowTeaching Cloud to the Programmers of Tomorrow
Teaching Cloud to the Programmers of Tomorrow
Mike Crabb
 
Building real time app by using asp.Net Core
Building real time app by using asp.Net CoreBuilding real time app by using asp.Net Core
Building real time app by using asp.Net Core
Commit Software Sh.p.k.
 
Moving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScaleMoving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScale
mmoline
 
Javascript Myths and its Evolution
Javascript Myths and its  EvolutionJavascript Myths and its  Evolution
Javascript Myths and its Evolution
Deepu S Nath
 
Beyond Apache: Faster Web Servers
Beyond Apache: Faster Web ServersBeyond Apache: Faster Web Servers
Beyond Apache: Faster Web Servers
webhostingguy
 
Rails on JRuby
Rails on JRubyRails on JRuby
Rails on JRuby
Rob C
 
CDN implmentation consideration
CDN implmentation considerationCDN implmentation consideration
CDN implmentation consideration
Avi Shalisman
 
Building & Testing Scalable Rails Applications
Building & Testing Scalable Rails ApplicationsBuilding & Testing Scalable Rails Applications
Building & Testing Scalable Rails Applications
evilmike
 
Real-world Experiences in Scala
Real-world Experiences in ScalaReal-world Experiences in Scala
Real-world Experiences in Scala
Amir Karimi
 
Cassandra Summit 2014: Deploying Cassandra for Call of Duty
Cassandra Summit 2014: Deploying Cassandra for Call of DutyCassandra Summit 2014: Deploying Cassandra for Call of Duty
Cassandra Summit 2014: Deploying Cassandra for Call of Duty
DataStax Academy
 
Scaling a Web Service
Scaling a Web ServiceScaling a Web Service
Scaling a Web Service
Leon Ho
 
Orchestrator for QlikView: add-on product description
Orchestrator for QlikView: add-on product descriptionOrchestrator for QlikView: add-on product description
Orchestrator for QlikView: add-on product description
Marco Zampieri
 
ASP.NET Scalability - VBUG London
ASP.NET Scalability - VBUG LondonASP.NET Scalability - VBUG London
ASP.NET Scalability - VBUG London
Phil Pursglove
 
Open source and cross platform .net
Open source and cross platform .netOpen source and cross platform .net
Open source and cross platform .net
Ibon Landa
 
GraphQL vs. (the) REST
GraphQL vs. (the) RESTGraphQL vs. (the) REST
GraphQL vs. (the) REST
coliquio GmbH
 
FULL stack -> MEAN stack
FULL stack -> MEAN stackFULL stack -> MEAN stack
FULL stack -> MEAN stack
Ashok Raj
 

Similar to A Gentle Introduction to Functions-as-a-Service (20)

PaaS with Java
PaaS with JavaPaaS with Java
PaaS with Java
Eberhard Wolff
 
Serverless Compose vs hurtownia danych
Serverless Compose vs hurtownia danychServerless Compose vs hurtownia danych
Serverless Compose vs hurtownia danych
The Software House
 
Glauber Costa on OSv as NoSQL platform
Glauber Costa on OSv as NoSQL platformGlauber Costa on OSv as NoSQL platform
Glauber Costa on OSv as NoSQL platform
Don Marti
 
Overview of PaaS: Java experience
Overview of PaaS: Java experienceOverview of PaaS: Java experience
Overview of PaaS: Java experience
Alex Tumanoff
 
Overview of PaaS: Java experience
Overview of PaaS: Java experienceOverview of PaaS: Java experience
Overview of PaaS: Java experience
Igor Anishchenko
 
Introduction to amazon web services for developers
Introduction to amazon web services for developersIntroduction to amazon web services for developers
Introduction to amazon web services for developers
Ciklum Ukraine
 
Cloud Foundry at Rakuten
Cloud Foundry at RakutenCloud Foundry at Rakuten
Cloud Foundry at Rakuten
Platform CF
 
Spring in the Cloud
Spring in the CloudSpring in the Cloud
Spring in the Cloud
Eberhard Wolff
 
Building a PaaS with Docker and AWS
Building a PaaS with Docker and AWSBuilding a PaaS with Docker and AWS
Building a PaaS with Docker and AWS
vesirin
 
Mad scalability: Scaling when you are not Google
Mad scalability: Scaling when you are not GoogleMad scalability: Scaling when you are not Google
Mad scalability: Scaling when you are not Google
Abel Muíño
 
Write less (code) and build more with serverless
Write less (code) and build more with serverlessWrite less (code) and build more with serverless
Write less (code) and build more with serverless
Dhaval Nagar
 
The Next Big Thing: Serverless
The Next Big Thing: ServerlessThe Next Big Thing: Serverless
The Next Big Thing: Serverless
Doug Vanderweide
 
Building Cloud-agnostic Serverless APIs
Building Cloud-agnostic Serverless APIsBuilding Cloud-agnostic Serverless APIs
Building Cloud-agnostic Serverless APIs
Postman
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
Konstantin Gredeskoul
 
Who needs containers in a serverless world
Who needs containers in a serverless worldWho needs containers in a serverless world
Who needs containers in a serverless world
Matthias Luebken
 
PaaS options for .NET
PaaS options for .NETPaaS options for .NET
PaaS options for .NET
Slawomir Dorzak
 
Containerizing GPU Applications with Docker for Scaling to the Cloud
Containerizing GPU Applications with Docker for Scaling to the CloudContainerizing GPU Applications with Docker for Scaling to the Cloud
Containerizing GPU Applications with Docker for Scaling to the Cloud
Subbu Rama
 
Presto@Uber
Presto@UberPresto@Uber
Presto@Uber
Zhenxiao Luo
 
Jumpstart your idea with AWS Serverless [Oct 2020]
Jumpstart your idea with AWS Serverless [Oct 2020]Jumpstart your idea with AWS Serverless [Oct 2020]
Jumpstart your idea with AWS Serverless [Oct 2020]
Dhaval Nagar
 
Writing and deploying serverless python applications
Writing and deploying serverless python applicationsWriting and deploying serverless python applications
Writing and deploying serverless python applications
Cesar Cardenas Desales
 
Serverless Compose vs hurtownia danych
Serverless Compose vs hurtownia danychServerless Compose vs hurtownia danych
Serverless Compose vs hurtownia danych
The Software House
 
Glauber Costa on OSv as NoSQL platform
Glauber Costa on OSv as NoSQL platformGlauber Costa on OSv as NoSQL platform
Glauber Costa on OSv as NoSQL platform
Don Marti
 
Overview of PaaS: Java experience
Overview of PaaS: Java experienceOverview of PaaS: Java experience
Overview of PaaS: Java experience
Alex Tumanoff
 
Overview of PaaS: Java experience
Overview of PaaS: Java experienceOverview of PaaS: Java experience
Overview of PaaS: Java experience
Igor Anishchenko
 
Introduction to amazon web services for developers
Introduction to amazon web services for developersIntroduction to amazon web services for developers
Introduction to amazon web services for developers
Ciklum Ukraine
 
Cloud Foundry at Rakuten
Cloud Foundry at RakutenCloud Foundry at Rakuten
Cloud Foundry at Rakuten
Platform CF
 
Building a PaaS with Docker and AWS
Building a PaaS with Docker and AWSBuilding a PaaS with Docker and AWS
Building a PaaS with Docker and AWS
vesirin
 
Mad scalability: Scaling when you are not Google
Mad scalability: Scaling when you are not GoogleMad scalability: Scaling when you are not Google
Mad scalability: Scaling when you are not Google
Abel Muíño
 
Write less (code) and build more with serverless
Write less (code) and build more with serverlessWrite less (code) and build more with serverless
Write less (code) and build more with serverless
Dhaval Nagar
 
The Next Big Thing: Serverless
The Next Big Thing: ServerlessThe Next Big Thing: Serverless
The Next Big Thing: Serverless
Doug Vanderweide
 
Building Cloud-agnostic Serverless APIs
Building Cloud-agnostic Serverless APIsBuilding Cloud-agnostic Serverless APIs
Building Cloud-agnostic Serverless APIs
Postman
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
Konstantin Gredeskoul
 
Who needs containers in a serverless world
Who needs containers in a serverless worldWho needs containers in a serverless world
Who needs containers in a serverless world
Matthias Luebken
 
Containerizing GPU Applications with Docker for Scaling to the Cloud
Containerizing GPU Applications with Docker for Scaling to the CloudContainerizing GPU Applications with Docker for Scaling to the Cloud
Containerizing GPU Applications with Docker for Scaling to the Cloud
Subbu Rama
 
Jumpstart your idea with AWS Serverless [Oct 2020]
Jumpstart your idea with AWS Serverless [Oct 2020]Jumpstart your idea with AWS Serverless [Oct 2020]
Jumpstart your idea with AWS Serverless [Oct 2020]
Dhaval Nagar
 
Writing and deploying serverless python applications
Writing and deploying serverless python applicationsWriting and deploying serverless python applications
Writing and deploying serverless python applications
Cesar Cardenas Desales
 
Ad

More from Valeri Karpov (20)

A Practical Introduction to GeoJSON
A Practical Introduction to GeoJSONA Practical Introduction to GeoJSON
A Practical Introduction to GeoJSON
Valeri Karpov
 
Introducing Async/Await
Introducing Async/AwaitIntroducing Async/Await
Introducing Async/Await
Valeri Karpov
 
TAO and the Essence of Modern JavaScript
TAO and the Essence of Modern JavaScriptTAO and the Essence of Modern JavaScript
TAO and the Essence of Modern JavaScript
Valeri Karpov
 
Mastering Async/Await in JavaScript
Mastering Async/Await in JavaScriptMastering Async/Await in JavaScript
Mastering Async/Await in JavaScript
Valeri Karpov
 
React, Redux, and Archetype
React, Redux, and ArchetypeReact, Redux, and Archetype
React, Redux, and Archetype
Valeri Karpov
 
TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDBTDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDB
Valeri Karpov
 
Conquering AngularJS Limitations
Conquering AngularJS LimitationsConquering AngularJS Limitations
Conquering AngularJS Limitations
Valeri Karpov
 
MongoDB MEAN Stack Webinar October 7, 2015
MongoDB MEAN Stack Webinar October 7, 2015MongoDB MEAN Stack Webinar October 7, 2015
MongoDB MEAN Stack Webinar October 7, 2015
Valeri Karpov
 
MEAN Stack NYC Meetup 20150717: TDD Your AngularJS + Ionic Directives With jQ...
MEAN Stack NYC Meetup 20150717: TDD Your AngularJS + Ionic Directives With jQ...MEAN Stack NYC Meetup 20150717: TDD Your AngularJS + Ionic Directives With jQ...
MEAN Stack NYC Meetup 20150717: TDD Your AngularJS + Ionic Directives With jQ...
Valeri Karpov
 
Lessons in Open Source from the MongooseJS ODM
Lessons in Open Source from the MongooseJS ODMLessons in Open Source from the MongooseJS ODM
Lessons in Open Source from the MongooseJS ODM
Valeri Karpov
 
Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)
Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)
Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)
Valeri Karpov
 
MongoDB Miami Meetup 1/26/15: Introduction to WiredTiger
MongoDB Miami Meetup 1/26/15: Introduction to WiredTigerMongoDB Miami Meetup 1/26/15: Introduction to WiredTiger
MongoDB Miami Meetup 1/26/15: Introduction to WiredTiger
Valeri Karpov
 
MongoDB API Talk @ HackPrinceton
MongoDB API Talk @ HackPrincetonMongoDB API Talk @ HackPrinceton
MongoDB API Talk @ HackPrinceton
Valeri Karpov
 
MEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopMEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona Workshop
Valeri Karpov
 
MongoDB Israel June Meetup
MongoDB Israel June MeetupMongoDB Israel June Meetup
MongoDB Israel June Meetup
Valeri Karpov
 
JS-IL: Getting MEAN in 1 Hour
JS-IL: Getting MEAN in 1 HourJS-IL: Getting MEAN in 1 Hour
JS-IL: Getting MEAN in 1 Hour
Valeri Karpov
 
JS-IL Keynote: MongoDB 2.6, Mongoose 4.0, and Beyond
JS-IL Keynote: MongoDB 2.6, Mongoose 4.0, and BeyondJS-IL Keynote: MongoDB 2.6, Mongoose 4.0, and Beyond
JS-IL Keynote: MongoDB 2.6, Mongoose 4.0, and Beyond
Valeri Karpov
 
MEAN Stack Workshop at Node Philly, 4/9/14
MEAN Stack Workshop at Node Philly, 4/9/14MEAN Stack Workshop at Node Philly, 4/9/14
MEAN Stack Workshop at Node Philly, 4/9/14
Valeri Karpov
 
MongoDB: Queries and Aggregation Framework with NBA Game Data
MongoDB: Queries and Aggregation Framework with NBA Game DataMongoDB: Queries and Aggregation Framework with NBA Game Data
MongoDB: Queries and Aggregation Framework with NBA Game Data
Valeri Karpov
 
Mongo db in 3 minutes BoilerMake
Mongo db in 3 minutes   BoilerMakeMongo db in 3 minutes   BoilerMake
Mongo db in 3 minutes BoilerMake
Valeri Karpov
 
A Practical Introduction to GeoJSON
A Practical Introduction to GeoJSONA Practical Introduction to GeoJSON
A Practical Introduction to GeoJSON
Valeri Karpov
 
Introducing Async/Await
Introducing Async/AwaitIntroducing Async/Await
Introducing Async/Await
Valeri Karpov
 
TAO and the Essence of Modern JavaScript
TAO and the Essence of Modern JavaScriptTAO and the Essence of Modern JavaScript
TAO and the Essence of Modern JavaScript
Valeri Karpov
 
Mastering Async/Await in JavaScript
Mastering Async/Await in JavaScriptMastering Async/Await in JavaScript
Mastering Async/Await in JavaScript
Valeri Karpov
 
React, Redux, and Archetype
React, Redux, and ArchetypeReact, Redux, and Archetype
React, Redux, and Archetype
Valeri Karpov
 
TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDBTDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDB
Valeri Karpov
 
Conquering AngularJS Limitations
Conquering AngularJS LimitationsConquering AngularJS Limitations
Conquering AngularJS Limitations
Valeri Karpov
 
MongoDB MEAN Stack Webinar October 7, 2015
MongoDB MEAN Stack Webinar October 7, 2015MongoDB MEAN Stack Webinar October 7, 2015
MongoDB MEAN Stack Webinar October 7, 2015
Valeri Karpov
 
MEAN Stack NYC Meetup 20150717: TDD Your AngularJS + Ionic Directives With jQ...
MEAN Stack NYC Meetup 20150717: TDD Your AngularJS + Ionic Directives With jQ...MEAN Stack NYC Meetup 20150717: TDD Your AngularJS + Ionic Directives With jQ...
MEAN Stack NYC Meetup 20150717: TDD Your AngularJS + Ionic Directives With jQ...
Valeri Karpov
 
Lessons in Open Source from the MongooseJS ODM
Lessons in Open Source from the MongooseJS ODMLessons in Open Source from the MongooseJS ODM
Lessons in Open Source from the MongooseJS ODM
Valeri Karpov
 
Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)
Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)
Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)
Valeri Karpov
 
MongoDB Miami Meetup 1/26/15: Introduction to WiredTiger
MongoDB Miami Meetup 1/26/15: Introduction to WiredTigerMongoDB Miami Meetup 1/26/15: Introduction to WiredTiger
MongoDB Miami Meetup 1/26/15: Introduction to WiredTiger
Valeri Karpov
 
MongoDB API Talk @ HackPrinceton
MongoDB API Talk @ HackPrincetonMongoDB API Talk @ HackPrinceton
MongoDB API Talk @ HackPrinceton
Valeri Karpov
 
MEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopMEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona Workshop
Valeri Karpov
 
MongoDB Israel June Meetup
MongoDB Israel June MeetupMongoDB Israel June Meetup
MongoDB Israel June Meetup
Valeri Karpov
 
JS-IL: Getting MEAN in 1 Hour
JS-IL: Getting MEAN in 1 HourJS-IL: Getting MEAN in 1 Hour
JS-IL: Getting MEAN in 1 Hour
Valeri Karpov
 
JS-IL Keynote: MongoDB 2.6, Mongoose 4.0, and Beyond
JS-IL Keynote: MongoDB 2.6, Mongoose 4.0, and BeyondJS-IL Keynote: MongoDB 2.6, Mongoose 4.0, and Beyond
JS-IL Keynote: MongoDB 2.6, Mongoose 4.0, and Beyond
Valeri Karpov
 
MEAN Stack Workshop at Node Philly, 4/9/14
MEAN Stack Workshop at Node Philly, 4/9/14MEAN Stack Workshop at Node Philly, 4/9/14
MEAN Stack Workshop at Node Philly, 4/9/14
Valeri Karpov
 
MongoDB: Queries and Aggregation Framework with NBA Game Data
MongoDB: Queries and Aggregation Framework with NBA Game DataMongoDB: Queries and Aggregation Framework with NBA Game Data
MongoDB: Queries and Aggregation Framework with NBA Game Data
Valeri Karpov
 
Mongo db in 3 minutes BoilerMake
Mongo db in 3 minutes   BoilerMakeMongo db in 3 minutes   BoilerMake
Mongo db in 3 minutes BoilerMake
Valeri Karpov
 
Ad

Recently uploaded (20)

AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 

A Gentle Introduction to Functions-as-a-Service

  • 1. A Gentle Introduction to Functions-as-a-Service Valeri Karpov @code_barbarian github.com/vkarpov15
  • 2. About Me ● Backend Lead @ Booster, Node.js OSS ● Core contributor for Mongoose, Mocha ● Blogger, thecodebarbarian.com ● Early employee at LevelUp, MongoDB, Booster ● Invented the MEAN stack
  • 3. What’s This Talk About? ● The progression of dev-ops for startups ● Why FaaS is the next natural step for dev-ops ● Retaining state in “stateless” functions ● Trade-offs between different FaaS providers
  • 4. 2008: Physical Machine in Dorm Room ● EC2 was limited, other hosting services sucked ● LevelUp’s first release on an Ubuntu tower ○ Physical machines die or get shut down ○ Campus ISP is slow or changes the IP ○ Limited scale: shipping a new PC takes days
  • 5. 2012: Amazon EC2 ● My next few startups all ran on 1-5 EC2 VMs ● Cloud VMs solve most physical machine issues ○ Power outages much less likely ○ Reliable internet maintained by Amazon ○ Spinning up a new VM takes minutes
  • 6. 2012: Amazon EC2 ● Vanilla EC2 was great for single server apps ● But what about multiple app servers? ○ 2 services on the same VM in isolation ○ Continuous Deployment ○ Scaling horizontally with a click
  • 7. 2015: Containers and Orchestration ● Docker, Mesos, Kubernetes, etc. ● Compelling for CD and isolation ● Still Have Problems with Resource Usage ○ Memory limits per VM ○ Docker hogs disk space
  • 8. Functions as a Service ● Instead of deploying an app, you deploy a bunch of stateless functions ● No VMs, no OS updates ● Resource limits (RAM, CPU) per function call ● Functions run in response to triggers
  • 9. API Gateways ● Cloud functions respond to triggers ● HTTP is a trigger, but what about: ○ API keys / auth ○ Rate limits ● FaaS providers have API Gateways for this
  • 10. FaaS Providers ● Amazon AWS Lambda ● Microsoft Azure Functions ● Google Cloud Functions ● IBM Cloud Functions ● Oracle Cloud Fn ● LunchBadger, + many more
  • 11. FaaS Open Source Libraries ● Kubeless ● OpenWhisk ● Fission
  • 12. FaaS Advantages ● Easier to scale, no need to worry about too much load on one service ● Cheaper for low-usage services ● Cheap and easy development environments ● Resource issues rare and easy to debug
  • 13. FaaS Problems ● No strong best practices yet ● Completely different way of writing apps ● Limited language support ● Managing triggers and API Gateways ● Sometimes you want to retain state...
  • 14. Why Retain State? ● Think about a persistent database connection
  • 15. Stateless is a Big Performance Problem ● Connecting to a database on every function call is slow
  • 16. But You Can Retain Global State ● Put db handle in global scope
  • 17. Common Trick Across FaaS Providers ● AWS Lambda: bit.ly/mongodb-lambda ● Azure Functions: bit.ly/mongodb-azure ○ Also With C#: bit.ly/csx-azure-state ● IBM Cloud: bit.ly/mongodb-ibm-cloud
  • 18. Trade-offs Between Popular Providers ● AWS Lambda ● Azure Functions ● Google Cloud Functions
  • 19. Size Restrictions ● Size limit per function (node_modules) ○ AWS Lambda: 50MB ○ Azure Functions: None (*) ○ Google Cloud: 100MB zipped, 500MB unzipped
  • 20. Primary Fee Structure ● AWS Lambda: $0.00001667 / GB-s, $0.20 / 1M ● Azure Functions: $0.000016 / GB-s, $0.20 / 1M ● Google Cloud: $0.0000025 / GB-s, $0.0000100 / GHz-s
  • 21. Hidden Fees: API Gateways ● AWS Lambda: $3.50 / 1M + data ● Azure Functions: no extra cost necessary ● Google Cloud Functions: no extra cost necessary
  • 22. Overall FaaS Recommendations ● Check out Azure Functions ● AWS Lambda and IBM Cloud are a mess
  • 23. Further Reading ● My Blog: ○ bit.ly/mongodb-azure ○ bit.ly/mongodb-ibm-cloud