Introduction to Serverless and
OpenFaaS
Vivek Singh, OpenFaaS Member & SSE@ Akamai
Cloud Native Meetup
Agenda ⚡
• What is serverless ?
• OpenFaaS
• Use case
• Other cool projects
• Live Demo
Tweet @openfaas 🤳 📸
Serverless is an
architectural pattern
What is Serverless anyway?
Monolith
MicroserviceMicroservice
Decreasing concern for infrastructure
Function
MicroserviceMicroservice
Short-lived
Single-purpose
No state
Auto-scaling
What are functions?
Function
• Started in Nov 2016
• Containers, Alexa, Swarm 🐳
• Production users 💻
• Bossie awards 🥇🥈
• 22.7k stars / 270+
contributors
Meet OpenFaaS
Architecture: Kubernetes-native
API
Gateway
OpenFaaS
Operator
Pod: Func 2
NATSPrometheus
Ingress/LB CRD Pod: Func 1
CRD
OpenFaaS Architecture
OpenFaaS Architecture (Contd.)
def handler(req):
r = requests.get(req)
return str(r.status_code)
handler.py
requirements.txt
requests
$ faas new --lang python3 http-status
Python
Template
Docker
Image
$ faas up1. 2.
Handler
Registry
+
Write a function
Stack files (YAML)
functions:
move-money:
lang: go
handler: ./move-money
image:move-money:0.1
environment:
content_type: "application/json"
secrets:
- bank-api-key
register-user:
lang: go
handler: ./register-user
image: register-user:0.2
environment:
http_proxy: http://corp.ad.com:3128
Problem Statement
COMPANY PROVIDES API’S AND WANTS TO ENABLE IT’S CUSTOMERS TO EXTEND THOSE
API’S AND RUN EXTENDED LOGIC ON IT’S PLATFORM


• Too many unique feature requests

• Crunch of resources
• Other priorities
Use case: Liveperson
PLATFORM TO BUILD CONVERSATIONAL AI BASED BOTS FOR COMMERCE
• Too many feature requests 

• Unique requests

• High Time-To-Market 

• Resource crunch

Liveperson Kubecon Talk
Solution
Solution Continued …
Customer
Specific
Functions
Events
Editing and Deployment
OpenFaaS End-users
arkade
KUBERNETES APPS FOR DEVELOPERS
• A simple CLI tool

• Installs kubernetes applications

• Install CLI tools
https://github.com/alexellis/arkade
inlets
CLOUD NATIVE TUNNEL FOR APIS
• Expose internal or local endpoints to public internet
• Kubernetes Operator



https://github.com/inlets/inlets
k3sup
BOOTSTRAP KUBERNETES WITH K3S OVER SSH < 1 MIN
• Lightweight CLI tool

• From Zero to KUBECONFIG with k3s

• Local or remote VM over SSH
https://github.com/alexellis/k3sup
Connect & Learn ⛵
• Join Slack
• Try the OpenFaaS Cloud
• Follow @openfaas on Twitter
https://bit.ly/2GapKWP
Join the community
Thank You!
www.openfaas.com @openfaas

Introduction to OpenFaas