SlideShare a Scribd company logo
Staying on Topic: OpenFaaS & Kafka
Richard Gee Core Contributor OpenFaaS Project
Docker Birmingham - May 2019
The Session
• OpenFaaS

• OpenFaaS Cloud

• Kafka Connector
• Get involved:
!" Tweet @rgee0 @openfaas
Staying on Topic - Invoke OpenFaaS functions with Kafka
What’s in a name?
Serverless
is an
architectural pattern
Application Evolution
Monolith
Decreasing concern for infrastructure
Size&Complexity
Application Evolution
Monolith
Decreasing concern for infrastructure
MicroserviceMicroserviceMicroserviceMicroservice
Size&Complexity
Application Evolution
Monolith
Decreasing concern for infrastructure
Function
MicroserviceMicroserviceMicroserviceMicroservice
Size&Complexity
Application Evolution
Monolith
Decreasing concern for infrastructure
Function
MicroserviceMicroserviceMicroserviceMicroservice
Size&Complexity
Short-lived
Single-purpose
No state
Auto-scaling
OpenFaaS: Functions as a Service
• Started in Nov 2016
• Containers, Alexa, Swarm
OpenFaaS: Functions as a Service
• Started in Nov 2016
• Containers, Alexa, Swarm
OpenFaaS: Functions as a Service
• Started in Nov 2016
• Containers, Alexa, Swarm
• CNCF landscape
OpenFaaS: Functions as a Service
• Started in Nov 2016
• Containers, Alexa, Swarm
• CNCF landscape
OpenFaaS: Functions as a Service
• Started in Nov 2016
• Containers, Alexa, Swarm
• CNCF landscape
• Multiple Production users
OpenFaaS: Functions as a Service
• Started in Nov 2016
• Containers, Alexa, Swarm
• CNCF landscape
• Multiple Production users
• 2 InfoWorld Bossies##
OpenFaaS: Functions as a Service
• Started in Nov 2016
• Containers, Alexa, Swarm
• CNCF landscape
• Multiple Production users
• 2 InfoWorld Bossies##
• Ecosystem Partners
Our community & contributors
#TeamServerless
Growth of OpenFaaS 17k
Developer-
First
Operator-
Friendly
Community-
Centric
DRIVEN BY CORE VALUES
OpenFaaS: Serverless on your terms
Anywhere
Avoid lock-in through
the use of Docker.
Run on any public or
private cloud.
OpenFaaS: Serverless on your terms
Anywhere
Avoid lock-in through
the use of Docker.
Run on any public or
private cloud.
Any scale
Auto-scale with
demand and to
zero when idle.
OpenFaaS: Serverless on your terms
You decide the limits
Anywhere
Avoid lock-in through
the use of Docker.
Run on any public or
private cloud.
Any code
Build microservices
& functions in any
language. Legacy
code and binaries.
Any scale
Auto-scale with
demand and to
zero when idle.
Serverless 2.0
Serverless 2.0 contract
• HTTP/8080
• Docker / OCI image
• Stateless
• Immutable
*adopted by
OpenFaaS & Knative
/
High Level Architecture
API
Gateway
Provider
Func 1
NATS
Prometheus
CLI/Web/API
Func 2
AlertManager
Queue
Worker
Orchestrator
Templates
Create a function
$ faas new --lang php7 black-cat
provider:
name: openfaas
gateway: http://127.0.0.1:8080
functions:
black-cat:
lang: php7
handler: ./black-cat
image: rgee0/black-cat:latest
stack.yml
1.
php7
Template
Docker
Image
Create a function
public function handle($data) {
$res=UnirestRequest::get($data);
return $res->code . PHP_EOL;
}
Handler.php
composer.json
"require": {
"php": "^7.2",
"mashape/unirest-php": "3.*"
}
$ faas up
2.
Build
Push
Deploy } UP
$ faas new --lang php7 black-cat
1.
Demonstration
Get Started
Demo - What we saw
• Created a new PHP7 function
• faas up to Build, Push & Deploy locally
• Added a second function
• Portability - Deploying remotely
• Using the Function Store
• Function Auto-scaling
End Users & Case Studies
Case Study 1: Bullet-proof
Bulletproof are using OpenFaaS to
build an on demand and scalable
Vulnerability Scanning (VA) engine.

Using OpenFaaS allows us to use
compute resource efficiently yet
maintain the ability to grow to meet
customer scanning demands.
We also like the ability to use pure
docker containers to compose
multiple scanning tools with different
technologies into a single, coherent
interface. This has reduced the time
need to add new tools to the platform.
Case-study 1: BT Research, UK
• Production usage

• Heavily reliant

• Research platform &
internal tools

• Shrink-wrap into
products

• KPIs
Case Study 1:Case Study 1: BT Research, UK
Case Study 2: Vision Banco, Paraguay
- Digital Transformation

- OpenFaaS in production with
HomeServe

- Initial deployment with Swarm

- KubeCon talk @ Seattle

- Completely on-prem with
GitLab
Case Study 3: Parking Application
Swarm
OpenFaaS
Scheduler
Routing / TLS
FrontEnd
External State
Fully Immutable
Flexible / Extensible
Portable
CI/CD with GitLab
Fn Fn Fn Fn Fn Fn
Fn Fn Fn Fn Fn Fn
Staying on Topic - Invoke OpenFaaS functions with Kafka
OpenFaaS Cloud
Focus on shipping functions without worrying
about the CI/CD pipeline or underlying
infrastructure
OpenFaaS Cloud is OpenFaaS, with
• Multi-user
• Personal dashboard & HTTPS
• CI/CD built-in (GitOps)
• Feedback via GitHub
• Free Community Cluster
• Self Hosted
High Level Flow
Func 1
git repoDevelop
Func 2
BuildKit
Github*
OpenFaaS
Cloud
Registry
OpenFaaS
Gateway
Conceptual workflow (CI/CD)
Workspace
stack.yml
dymo/handler.go
dymo/handler_test.go
GitHub
App
git
push
rgee0/dymo
OpenFaaS
Cloud
Package
Build
Deploy
https://rgee0.o6s.io/dymo
JSON
Encrypted secrets
secrets.yml
access_key=Ydx==
secret_key=E2Dvv==
access_key=1234
secret_key=abcd
Seal()
access_key=1234
Unseal() secret_key=abcd
Public Key
Private Key
Demonstration
OpenFaaS Cloud
GitHub Feedback
Staying on Topic - Invoke OpenFaaS functions with Kafka
Dashboard
Kafka Connector
Trigger functions through Topics
13
● Communication
asynchronous
● Applications fully
decoupled
● No restriction on
schema, no shared
datastore
● Microservices
independent,
increased
resiliency
● Microservices state
still important,
persistent
ORDERING
INVOICING WAREHOUSE SHIPPING
LOGGING
MESSAGE QUEUE
Order
Placed
Order
Placed
Invoice
Generated
Order
Placed
Item
Found
Item
Found
Item
Shipped
Order
Placed
Item
Shipped
All
Events
Invoice
Generated
Mike Bywater - https://bit.ly/2K9XBTP
Kafka Connector
• Connector SDK
• Helm Chart
• Integrate with existing instances
• Function Annotations
• Consumer of multiple topics
Kafka Connector
Incoming
message
Topic: signup
msg:
{"userid":1013}
Lookup Functions
Use /system/functions
to BuildFunctionMap()
Invoke: 
/function/email-welcome
with:
{"userid":1013}
Kafka Connector
Topic Function
payment billing-audit
signup email-welcome
... ...
Builds
API Gateway
Function: billing-audit
Annotations:
topic: payment
Function: email-welcome
Annotations:
topic: signup
Function Map
Deploying
image: openfaas/kafka-connector:0.3.3
replicas: 1
gateway_url: http://gateway.openfaas:8080
topics: faas-request
print_response: true
print_response_body: false
broker_host: kafka
basic_auth: true
$ helm upgrade kafka-connector 
openfaas/kafka-connector 
—-install 
—-namespace openfaas
$ helm upgrade kafka-connector 
openfaas/kafka-connector 
—install 
--namespace openfaas 
--set image=rgee0/kafka-connector:0.4.0 
--set topics=“cats,not-cats" 
--set print_response_body=true
Cat Facts
Kafka
Topic: not-cats
Topic:
cats
not-catsTopic: cats
  cat-sifter   inception
 notify-slack post-tweet
 db-stasher
{
"url":
"https://an.image.com/rainbow.jpg",
"inferences": [
{ "score": 0.99434, "name": "rod" },
{ "score": 0.00024, "name": "jane" },
{ "score": 0.00006, "name": "freddy" }
],
"category": "not-cats"
}
 post-tweet  notify-slack
Cat Facts
Kafka
Topic: not-cats
Topic:
cats
not-catsTopic: cats
  cat-sifter   inception
 notify-slack post-tweet
 db-stasher
What about OpenFaaS Cloud?
Cat Facts
  pic-count
OpenFaaS Cloud
Kafka
Topic: not-cats
Topic:
cats
not-catsTopic: cats
  cat-sifter   inception
 notify-slack post-tweet
 db-stasher
Demo - What we saw
• OpenFaaS on Digital Ocean DOKS
• Kafka Connector & Annotated Functions
• Multiple Topics -> Function -> DB
• Voice Service
• Alexa Skill
• OpenFaaS Cloud Function
Wrapping Up
OpenFaaS:
Serverless Functions Made Simple
OpenFaaS Cloud:
Further reduce friction
Kafka Connector:
Connect Kafka topics to OpenFaaS Functions
Integrate your existing tools & applications
Get Involved
Join Slack:
https://docs.openfaas.com/community
Try the Workshop:
https://github.com/openfaas/workshop
*Instructor led option available
OpenFaaS Cloud Community Cluster:
https://forms.gle/8e6ZXJKMcDHpV6Xu6
Resources
Docs: https://docs.openfaas.com
Blog: https://www.openfaas.com/blog
Follow on Twitter: @OpenFaaS
Kafka Connector:
https://github.com/openfaas/faas-netes
Try Digital Ocean Marketplace:
https://m.do.co/c/2962aa9e56a1
Support OpenFaaS
Sponsor the project:
https://www.openfaas.com/donate/
Donate using Open Collective:
https://opencollective.com/openfaas
Donate using LF Community Bridge:
https://bit.ly/2V8jasf
@rgee0
Thank You!
www.openfaas.com

More Related Content

What's hot (20)

PPTX
Service Mesh - Why? How? What?
Orkhan Gasimov
 
PPTX
The Current State of Table API in 2022
Flink Forward
 
PPTX
SQL Server Clustering Part1
Sql Trainer Kareem
 
PDF
Building a Streaming Microservice Architecture: with Apache Spark Structured ...
Databricks
 
PDF
Red Hat OpenShift V3 Overview and Deep Dive
Greg Hoelzer
 
PDF
[AIX] RDX Device Backup Guide
CheolHee Han
 
PDF
MySQL Enterprise Backup (MEB)
Mydbops
 
PPTX
Avro
Eric Turcotte
 
PDF
Life as a SRE at Instana
Marcel Birkner
 
PPTX
Introduction of Tomcat
Debashis Nath
 
PDF
PostgreSQL Replication High Availability Methods
Mydbops
 
PDF
Care and Feeding of Catalyst Optimizer
Databricks
 
PDF
[XECon2016] A-4 조정현 GitHub + Jenkins + Docker로 자동배포 시스템 구축하기
XpressEngine
 
PDF
Building layers of defense for your application
VMware Tanzu
 
PDF
Introduction to SAML 2.0
Mika Koivisto
 
PDF
Mastering PostgreSQL Administration
EDB
 
PDF
Optimized dso data activation using massive parallel processing in sap net we...
Nuthan Kishore
 
PPTX
Oracle ACFS High Availability NFS Services (HANFS)
Anju Garg
 
PPTX
Embedding Jaspersoft into your PHP application
Mariano Luna
 
PDF
JSON Data Parsing in Snowflake (By Faysal Shaarani)
Faysal Shaarani (MBA)
 
Service Mesh - Why? How? What?
Orkhan Gasimov
 
The Current State of Table API in 2022
Flink Forward
 
SQL Server Clustering Part1
Sql Trainer Kareem
 
Building a Streaming Microservice Architecture: with Apache Spark Structured ...
Databricks
 
Red Hat OpenShift V3 Overview and Deep Dive
Greg Hoelzer
 
[AIX] RDX Device Backup Guide
CheolHee Han
 
MySQL Enterprise Backup (MEB)
Mydbops
 
Life as a SRE at Instana
Marcel Birkner
 
Introduction of Tomcat
Debashis Nath
 
PostgreSQL Replication High Availability Methods
Mydbops
 
Care and Feeding of Catalyst Optimizer
Databricks
 
[XECon2016] A-4 조정현 GitHub + Jenkins + Docker로 자동배포 시스템 구축하기
XpressEngine
 
Building layers of defense for your application
VMware Tanzu
 
Introduction to SAML 2.0
Mika Koivisto
 
Mastering PostgreSQL Administration
EDB
 
Optimized dso data activation using massive parallel processing in sap net we...
Nuthan Kishore
 
Oracle ACFS High Availability NFS Services (HANFS)
Anju Garg
 
Embedding Jaspersoft into your PHP application
Mariano Luna
 
JSON Data Parsing in Snowflake (By Faysal Shaarani)
Faysal Shaarani (MBA)
 

Similar to Staying on Topic - Invoke OpenFaaS functions with Kafka (20)

PDF
OpenFaaS serverless framework for Docker and Kubernetes - London
Alex Ellis
 
PDF
Docker and serverless Randstad Jan 2019: OpenFaaS Serverless: when functions ...
Edward Wilde
 
PDF
OpenFaaS KubeCon Zero to Serverless in 60 seconds anywhere
Alex Ellis
 
PDF
Zero to Serverless in 60s - Anywhere
Brian Christner
 
PDF
Zero to Serverless - OpenFaaS at the Open Source Summit
Alex Ellis
 
PDF
OpenFaaS - zero serverless in 60 seconds anywhere with case-studies
Alex Ellis
 
PDF
Serverless: when functions and GitOps collide
Edward Wilde
 
PDF
OpenFaaS JeffConf 2017 - Milan
Alex Ellis
 
PDF
OpenFaaS 2019 Project Update
Alex Ellis
 
PDF
GitOps meets Serverless
Alex Ellis
 
PDF
CNCF Intro & Demo - OpenFaaS framework
Alex Ellis
 
PDF
Kubernetes and AWS Lambda can play nicely together
Edward Wilde
 
PDF
Docker Cambridge: Serverless Functions Made Simple with OpenFaaS
Alex Ellis
 
PDF
ApiOps Tampere meetup 17.11.2017- serverless_with_openfaas
Sakari Hoisko
 
PDF
FaaS-and-Furious
Moby Project
 
PPTX
An introduction to Serverless
Adrien Blind
 
PDF
DCEU 18: Docker Containers in a Serverless World
Docker, Inc.
 
PDF
Introduction to OpenFaas
GDG Cloud Bengaluru
 
PDF
Redefining Plattform "Openness" with OpenFaaS
Simon Pelczer
 
PPTX
Intro to openfaas
Hong Zhan (Michael) Huang
 
OpenFaaS serverless framework for Docker and Kubernetes - London
Alex Ellis
 
Docker and serverless Randstad Jan 2019: OpenFaaS Serverless: when functions ...
Edward Wilde
 
OpenFaaS KubeCon Zero to Serverless in 60 seconds anywhere
Alex Ellis
 
Zero to Serverless in 60s - Anywhere
Brian Christner
 
Zero to Serverless - OpenFaaS at the Open Source Summit
Alex Ellis
 
OpenFaaS - zero serverless in 60 seconds anywhere with case-studies
Alex Ellis
 
Serverless: when functions and GitOps collide
Edward Wilde
 
OpenFaaS JeffConf 2017 - Milan
Alex Ellis
 
OpenFaaS 2019 Project Update
Alex Ellis
 
GitOps meets Serverless
Alex Ellis
 
CNCF Intro & Demo - OpenFaaS framework
Alex Ellis
 
Kubernetes and AWS Lambda can play nicely together
Edward Wilde
 
Docker Cambridge: Serverless Functions Made Simple with OpenFaaS
Alex Ellis
 
ApiOps Tampere meetup 17.11.2017- serverless_with_openfaas
Sakari Hoisko
 
FaaS-and-Furious
Moby Project
 
An introduction to Serverless
Adrien Blind
 
DCEU 18: Docker Containers in a Serverless World
Docker, Inc.
 
Introduction to OpenFaas
GDG Cloud Bengaluru
 
Redefining Plattform "Openness" with OpenFaaS
Simon Pelczer
 
Intro to openfaas
Hong Zhan (Michael) Huang
 
Ad

Recently uploaded (20)

PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Ad

Staying on Topic - Invoke OpenFaaS functions with Kafka