SlideShare a Scribd company logo
OpenFaaS framework
Serverless functions for Docker & Kubernetes
CLOUD NATIVE LONDON - 5TH SEP
@alexellisuk / openfaas.com
What is Serverless?
MicroserviceMicroserviceMicroservice
Monolith
Microservice
Function
Serverless	evolu*on
“Alexa, how’s
the weather?”
{ “intent”:
“FindWeather” }
{ “speech”:
“It’s 70 degrees” }
Lambda
Function
“Alexa, how’s
the weather?”
{ “intent”:
“FindWeather” }
{ “speech”:
“It’s 70 degrees” }
+
OpenFaaS
DRIVING FACTORS
PortabilityEase of use
Simplicity
Open
Platform
How did OpenFaaS come about?
STORY SO FAR
• “Lambda but on containers for Alexa”
• Dockercon Cool Hacks - “push Docker beyond what it was designed to do”
• Major changes since Dockercon
• Top trending Open Source project overall
• > 5k stars
• Kubernetes & external provider support
• Asynchronous processing via NATS
• CLI & templating
• Regular contributors & Slack Community
OpenFaaS top contributors and influencers
What are serverless use-cases?
ANYTHING
Image/Video
conversion
Machine
Learning
Mobile Back-
ends / IoT
HTTP
services
Chat Bots
Batch Jobs
What is OpenFaaS?
"A SERVERLESS FRAMEWORK BUILT ON CONTAINERS"
• Basic primitive: containers in OCI format
• Container security
• r/o filesystem, privilege drop, content trust
• Manage functions with scheduler/orchestrator
• Rich container eco-system - commercial & community
• Anything can be a function - polyglot
• Leverage existing skills in teams (including Windows)
• Avoid vendor lock-in
• Run anywhere - cloud or on-prem
OpenFaaS serverless framework for Docker and Kubernetes - London
Payroll S3	Minio
put	bonus.json
Calculate	Gross
get	bonus.json,

employees.json
MyAssistant
Comes in one flavor: Cloud Native
API Gateway Function Watchdog
Prometheus Swarm Kubernetes
HTTP
body
stdinrequest
stdoutresponse
“/usr/bin/node

handler.js”
headers
body
headers
Forked process
Function watchdog
Performance - fork vs After Burn
HELLO-WORLD & APACHE-BENCH
How do I write a function?
WRITE A HANDLER
def handler(req):
r = requests.get(req)
print(r.status_code)
handler.py
requirements.txt
Python
Template
Docker
Image
requests
$ faas-cli new --lang python --name sample
Container Registry
What languages are available?
SHORT ANSWER - ANY
• Use supported templates
• Edit them or bring your own
• Or go “full Docker”
How do I arrange functions?
provider:
name: faas
gateway: http://localhost:31112
shrink-image:
image: functions/resizer:latest
fprocess: "convert - -resize 50% fd:1”
environment:
MAGICK_FONT_PATH: /fonts
url-ping:
lang: python
handler: ./sample/url-ping
image: alexellis/url-ping
$ faas-cli build -f ./sample.yml
$ faas-cli deploy -f ./sample.yml
YAML STACK
Deployed in 60 seconds
QUICK DEMO
Auto-scaling
DEMO
Mirror East	CoastWest	Coast
Kubernetes support
VIA EXTERNAL PROVIDER
kubernetes
• Rich eco-system
• Large user-base with existing on-prem/
hybrid deployments
• Similar primitives to Docker Swarm
Kubernetes support
VIA EXTERNAL PROVIDER
Gateway faas-netes
UI
CLI
Web
Func 1
Func 1
Func 2
kubernetes
Synchronous invocation
IN STORE RETURNS
marshal	request
Gateway Func: resizer
HTTP

200
Resize

Image
Asynchronous invocation
RETURN A PRODUCT BY MAIL
NATS Queue
marshal	request
Gateway Queue-worker
dequeue
Func: resizer
HTTP

200
HTTP

200
Resize

Image
Asynchronous concerns
ADDED COMPLEXITY
• Points	of	failure:	
• Func*on	
• Queue-worker	
• Queue	server
• Func*on	response	
• Store	in	S3	or	aDB	
• Poll	for	result	
• Callback	to	URL?
Asynchronous invocation
WITH A CALLBACK-URL
Gateway Func: resizer
HTTP

200
http://x.y.z
X-Callback-Url:	
hTp://x.y.z
X-Callback-Url
Resize

Image
Queue etc
openfaas.com
FanClub GetAvatar
hTps://
S3	bucket
Fanclub
HOW IT WORKS
What’s next for OpenFaaS?
SET REPLICAS = 10,000
• Roadmap - supporting users
• Evaluating - ADP, Huawei, CodeFresh, Microsoft, IRT Saint Exupery
• Building - Huawei, Hyper.sh, Kong
• Additional language templates & AfterBurn
• Guides, manual & tutorials for developer-clouds
• Get SWAG and get involved
• Contributors, sponsorship and finding a home
• Speaking
• LinuxCon, L.A. - Sept
• JeffConf, Milan - Sept
• Dockercon EU, Copenhagen - October
@alexellisuk
https://www.openfaas.com
Fun examples
FUNCTIONS / DEMOS
• Dockercon closing keynote (video)
Derek
• https://github.com/alexellis/derek
Twitter + Elastic search / Youtube Downloader
• https://github.com/alexellis/journey-expert
Other functions
• https://github.com/alexellis/faas-contributor-stamp
• https://github.com/alexellis/faas-office-sample
• https://github.com/alexellis/faas-img2ansi
External providers
Gateway Watchdog
Gateway faas-netes Watchdog
Gateway Create Swarm Service
Gateway faas-netes Create deployment & service
Invoke
Deploy
fprocess
fprocess

More Related Content

What's hot (20)

PDF
OpenFaaS - zero serverless in 60 seconds anywhere with case-studies
Alex Ellis
 
PDF
Zero to #Serverless in 60 seconds, anywhere
Alex Ellis
 
PDF
TechXLR8 - XLR8 your cloud with Docker and Serverless FaaS
Alex Ellis
 
PDF
Cloud native applications
reallavalamp
 
PDF
Immutable Infrastructure: Rise of the Machine Images
C4Media
 
PDF
Ceylon From Here to Infinity: The Big Picture and What's Coming
Virtual JBoss User Group
 
PDF
Running tests for every commit: Gerrit, Jenkins, Docker, AWS
Alexander Akbashev
 
PDF
Splunk user group - automating Splunk with Ansible
Mark Phillips
 
PDF
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
CodeOps Technologies LLP
 
PPTX
OpenWhisk
Juan Pablo Genovese
 
PDF
Continuous Integration on Steroids
Alexander Akbashev
 
PDF
Bosh 2-0-reloaded
Gwenn Etourneau
 
PDF
IoT in the DataCenter @ Container Camp, London
Alex Ellis
 
PDF
Staying on Topic - Invoke OpenFaaS functions with Kafka
Richard Gee
 
PPTX
How Docker simplifies CI/CD
Gabriel N. Schenker
 
PDF
DevOpsDays Houston 2019 - Shaun Ladewig, Robert Stone - From OverTheWallOps t...
DevOpsDays Houston
 
PDF
Partir à la découverte du serverless avec openfaas
Emmanuel LEBEAUPIN
 
PDF
Webinar: Queues with RabbitMQ - Lorna Mitchell
Codemotion
 
PDF
Ultimate DevOps - Jenkins Enterprise & Red Hat OpenShift
Andy Pemberton
 
PDF
Immutable infrastructure with Boxfuse
Lars Östling
 
OpenFaaS - zero serverless in 60 seconds anywhere with case-studies
Alex Ellis
 
Zero to #Serverless in 60 seconds, anywhere
Alex Ellis
 
TechXLR8 - XLR8 your cloud with Docker and Serverless FaaS
Alex Ellis
 
Cloud native applications
reallavalamp
 
Immutable Infrastructure: Rise of the Machine Images
C4Media
 
Ceylon From Here to Infinity: The Big Picture and What's Coming
Virtual JBoss User Group
 
Running tests for every commit: Gerrit, Jenkins, Docker, AWS
Alexander Akbashev
 
Splunk user group - automating Splunk with Ansible
Mark Phillips
 
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
CodeOps Technologies LLP
 
Continuous Integration on Steroids
Alexander Akbashev
 
Bosh 2-0-reloaded
Gwenn Etourneau
 
IoT in the DataCenter @ Container Camp, London
Alex Ellis
 
Staying on Topic - Invoke OpenFaaS functions with Kafka
Richard Gee
 
How Docker simplifies CI/CD
Gabriel N. Schenker
 
DevOpsDays Houston 2019 - Shaun Ladewig, Robert Stone - From OverTheWallOps t...
DevOpsDays Houston
 
Partir à la découverte du serverless avec openfaas
Emmanuel LEBEAUPIN
 
Webinar: Queues with RabbitMQ - Lorna Mitchell
Codemotion
 
Ultimate DevOps - Jenkins Enterprise & Red Hat OpenShift
Andy Pemberton
 
Immutable infrastructure with Boxfuse
Lars Östling
 

Similar to OpenFaaS serverless framework for Docker and Kubernetes - London (20)

PDF
FaaS-and-Furious
Moby Project
 
PDF
Zero to Serverless in 60s - Anywhere
Brian Christner
 
PDF
Docker and serverless Randstad Jan 2019: OpenFaaS Serverless: when functions ...
Edward Wilde
 
PDF
ApiOps Tampere meetup 17.11.2017- serverless_with_openfaas
Sakari Hoisko
 
PDF
Introduction to OpenFaas
GDG Cloud Bengaluru
 
PPTX
Intro to openfaas
Hong Zhan (Michael) Huang
 
PDF
Serverless: when functions and GitOps collide
Edward Wilde
 
PDF
Redefining Plattform "Openness" with OpenFaaS
Simon Pelczer
 
PDF
OpenFaaS
Jacopo Carlini
 
PDF
Kubernetes and AWS Lambda can play nicely together
Edward Wilde
 
PDF
FaaS you like it (if Shakespeare had written Functions-as-a-Service)
Ewan Slater
 
PPTX
Implementing FaaS on Kubernetes using Kubeless
Ahmed Misbah
 
PDF
NATS Connect Live | Serverless on Kubernetes with OpenFaaS & NATS
NATS
 
PDF
DCEU 18: Docker Containers in a Serverless World
Docker, Inc.
 
PPTX
Building a raspberry pi cluster
Yoseph Buitrago
 
PPTX
Docker Serverless
Brian Christner
 
PPTX
Containers, Serverless and Functions in a nutshell
Eugene Fedorenko
 
PPTX
Serverless design with Fn project
Siva Rama Krishna Chunduru
 
PPTX
An introduction to Serverless
Adrien Blind
 
PDF
Spring, Functions, Serverless and You
VMware Tanzu
 
FaaS-and-Furious
Moby Project
 
Zero to Serverless in 60s - Anywhere
Brian Christner
 
Docker and serverless Randstad Jan 2019: OpenFaaS Serverless: when functions ...
Edward Wilde
 
ApiOps Tampere meetup 17.11.2017- serverless_with_openfaas
Sakari Hoisko
 
Introduction to OpenFaas
GDG Cloud Bengaluru
 
Intro to openfaas
Hong Zhan (Michael) Huang
 
Serverless: when functions and GitOps collide
Edward Wilde
 
Redefining Plattform "Openness" with OpenFaaS
Simon Pelczer
 
OpenFaaS
Jacopo Carlini
 
Kubernetes and AWS Lambda can play nicely together
Edward Wilde
 
FaaS you like it (if Shakespeare had written Functions-as-a-Service)
Ewan Slater
 
Implementing FaaS on Kubernetes using Kubeless
Ahmed Misbah
 
NATS Connect Live | Serverless on Kubernetes with OpenFaaS & NATS
NATS
 
DCEU 18: Docker Containers in a Serverless World
Docker, Inc.
 
Building a raspberry pi cluster
Yoseph Buitrago
 
Docker Serverless
Brian Christner
 
Containers, Serverless and Functions in a nutshell
Eugene Fedorenko
 
Serverless design with Fn project
Siva Rama Krishna Chunduru
 
An introduction to Serverless
Adrien Blind
 
Spring, Functions, Serverless and You
VMware Tanzu
 
Ad

More from Alex Ellis (6)

PDF
The Need For A Cloud Native Tunnel
Alex Ellis
 
PDF
Still waiting for IPv6? Try the inlets-operator
Alex Ellis
 
PDF
IoT + Docker - securing the datacenter, Peterborough
Alex Ellis
 
PDF
IoT: Docker and Raspberry Pi for CamJam
Alex Ellis
 
PDF
Docker Overview
Alex Ellis
 
PDF
Docker & IoT: protecting the Datacenter
Alex Ellis
 
The Need For A Cloud Native Tunnel
Alex Ellis
 
Still waiting for IPv6? Try the inlets-operator
Alex Ellis
 
IoT + Docker - securing the datacenter, Peterborough
Alex Ellis
 
IoT: Docker and Raspberry Pi for CamJam
Alex Ellis
 
Docker Overview
Alex Ellis
 
Docker & IoT: protecting the Datacenter
Alex Ellis
 
Ad

Recently uploaded (20)

PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 

OpenFaaS serverless framework for Docker and Kubernetes - London