Serverless with
OpenFaaS
Tampere ApiOPS Meetup
14.11.2017
https://www.meetup.com/APIOps-Tampere/
Let’s sail together.
E F I C O D E . C O M / W O R K
What ? Why ?
How?
E F I C O D E . C O M
Serverless? - Architecture is evolving
E F I C O D E . C O M
"Serverless" is a misnomer - we're talking about a new
architectural pattern for event-driven systems. For this reason
serverless functions are often used as connective glue between other
services or in an event-driven architecture. In the days of old we
called this a service bus.
Source: https://blog.alexellis.io/introducing-functions-as-a-service/
Serverless Function ?
E F I C O D E . C O MSource: https://blog.alexellis.io/introducing-functions-as-a-service/
A serverless function is a small, discrete and
reusable chunk of code that:
● is short-lived
● is not a daemon (long-running)
● does not publish TCP services
● is not stateful (=stateless)
● makes use of your existing services or
third-party resources
● executes in a few seconds (based upon AWS
Lambda's default
Function Container(s)
Serverless Function
Serverless Platform ?
E F I C O D E . C O M
● Host functions
● Route entrypoins to functions
● Scale functions and infrastructure
● Handle functions lifetime
● Centralized auth to functions Serverless (OpenFaaS)
Serverless Infra
On one hand we have Serverless products from IaaS providers such as Lambda, Google Cloud
Functions and Azure functions and on the other frameworks such as OpenFaaS which let an
orchestration platform such as Docker Swarm or Kubernetes do the heavy lifting.
Source: https://blog.alexellis.io/introducing-functions-as-a-service/
OpenFaas Architecture
E F I C O D E . C O M
E F I C O D E . C O M
PROMETHEUS
A Tiny HTTP server
Entrypoint for HTTP requests
Forwards to target process
Uses STDIN
API replies with STDOUT
External route to the functions
UI to browse and invoke functions
Metrics
Scaling of the containers
Docker Swarm mode
Kubernetes
WATCHDOG API GATEWAY
Function Orchestration
E F I C O D E . C O M
OpenFaaS Demo Architecture
E F I C O D E . C O M
Computing resources
Virtual- and/or physical- servers
OpenFaaS Demo Architecture
E F I C O D E . C O M
Computing resources
Virtual- and/or physical- servers Docker Container
Platform(s)
OpenFaaS Demo Architecture
E F I C O D E . C O M
Computing resources
Virtual- and/or physical- servers Docker Container
Platform(s)
OpenFaaS Demo Architecture
E F I C O D E . C O M
Computing resources
Virtual- and/or physical- servers Docker Container
Platform(s)
OpenFaaS Demo Architecture
E F I C O D E . C O M
Computing resources
Virtual- and/or physical- servers Docker Container
Platform(s)
Docker Swarm Mode
Clustering
OpenFaaS Demo Architecture
E F I C O D E . C O M
Serverless (OpenFaaS)
Serverless InfraComputing resources
Virtual- and/or physical- servers Docker Container
Platform(s)
Docker Swarm Mode
Clustering
OpenFaaS Demo Architecture
E F I C O D E . C O M
Serverless (OpenFaaS)
Serverless Infra
Function Container
Serverless Function
Computing resources
Virtual- and/or physical- servers Docker Container
Platform(s)
Docker Swarm Mode
Clustering
OpenFaaS Demo Architecture
E F I C O D E . C O M
Serverless (OpenFaaS)
Serverless Infra
Function Container
Serverless Function
Computing resources
Virtual- and/or physical- servers Docker Container
Platform(s)
Docker Swarm Mode
Clustering
OpenFaaS Demo Architecture
E F I C O D E . C O M
Serverless (OpenFaaS)
Serverless Infra
Function Container
Serverless Function
Computing resources
Virtual- and/or physical- servers Docker Container
Platform(s)
Docker Swarm Mode
Clustering
OpenFaaS Demo Architecture
E F I C O D E . C O M
Serverless (OpenFaaS)
Serverless Infra
Function Container
Serverless Function
Computing resources
Virtual- and/or physical- servers Docker Container
Platform(s)
Docker Swarm Mode
Clustering
OpenFaaS Demo Architecture
E F I C O D E . C O M
Serverless (OpenFaaS)
Serverless Infra
Function Container
Serverless Function
Computing resources
Virtual- and/or physical- servers Docker Container
Platform(s)
Docker Swarm Mode
Clustering
Jam with
OpenFaaS
https://www.openfaas.com/
E F I C O D E . C O M
THANK YOU
E F I C O D E . C O M
Sakari Hoisko
Senior Devops Consultant
sakari.hoisko@eficode.com
Mikki Levón
Software Engineer
mikki.levon@eficode.com
https://www.linkedin.com/in/mikki-levon/

ApiOps Tampere meetup 17.11.2017- serverless_with_openfaas

  • 1.
    Serverless with OpenFaaS Tampere ApiOPSMeetup 14.11.2017 https://www.meetup.com/APIOps-Tampere/
  • 2.
    Let’s sail together. EF I C O D E . C O M / W O R K
  • 3.
    What ? Why? How? E F I C O D E . C O M
  • 4.
    Serverless? - Architectureis evolving E F I C O D E . C O M "Serverless" is a misnomer - we're talking about a new architectural pattern for event-driven systems. For this reason serverless functions are often used as connective glue between other services or in an event-driven architecture. In the days of old we called this a service bus. Source: https://blog.alexellis.io/introducing-functions-as-a-service/
  • 5.
    Serverless Function ? EF I C O D E . C O MSource: https://blog.alexellis.io/introducing-functions-as-a-service/ A serverless function is a small, discrete and reusable chunk of code that: ● is short-lived ● is not a daemon (long-running) ● does not publish TCP services ● is not stateful (=stateless) ● makes use of your existing services or third-party resources ● executes in a few seconds (based upon AWS Lambda's default Function Container(s) Serverless Function
  • 6.
    Serverless Platform ? EF I C O D E . C O M ● Host functions ● Route entrypoins to functions ● Scale functions and infrastructure ● Handle functions lifetime ● Centralized auth to functions Serverless (OpenFaaS) Serverless Infra On one hand we have Serverless products from IaaS providers such as Lambda, Google Cloud Functions and Azure functions and on the other frameworks such as OpenFaaS which let an orchestration platform such as Docker Swarm or Kubernetes do the heavy lifting. Source: https://blog.alexellis.io/introducing-functions-as-a-service/
  • 7.
    OpenFaas Architecture E FI C O D E . C O M
  • 8.
    E F IC O D E . C O M PROMETHEUS A Tiny HTTP server Entrypoint for HTTP requests Forwards to target process Uses STDIN API replies with STDOUT External route to the functions UI to browse and invoke functions Metrics Scaling of the containers Docker Swarm mode Kubernetes WATCHDOG API GATEWAY Function Orchestration E F I C O D E . C O M
  • 9.
    OpenFaaS Demo Architecture EF I C O D E . C O M Computing resources Virtual- and/or physical- servers
  • 10.
    OpenFaaS Demo Architecture EF I C O D E . C O M Computing resources Virtual- and/or physical- servers Docker Container Platform(s)
  • 11.
    OpenFaaS Demo Architecture EF I C O D E . C O M Computing resources Virtual- and/or physical- servers Docker Container Platform(s)
  • 12.
    OpenFaaS Demo Architecture EF I C O D E . C O M Computing resources Virtual- and/or physical- servers Docker Container Platform(s)
  • 13.
    OpenFaaS Demo Architecture EF I C O D E . C O M Computing resources Virtual- and/or physical- servers Docker Container Platform(s) Docker Swarm Mode Clustering
  • 14.
    OpenFaaS Demo Architecture EF I C O D E . C O M Serverless (OpenFaaS) Serverless InfraComputing resources Virtual- and/or physical- servers Docker Container Platform(s) Docker Swarm Mode Clustering
  • 15.
    OpenFaaS Demo Architecture EF I C O D E . C O M Serverless (OpenFaaS) Serverless Infra Function Container Serverless Function Computing resources Virtual- and/or physical- servers Docker Container Platform(s) Docker Swarm Mode Clustering
  • 16.
    OpenFaaS Demo Architecture EF I C O D E . C O M Serverless (OpenFaaS) Serverless Infra Function Container Serverless Function Computing resources Virtual- and/or physical- servers Docker Container Platform(s) Docker Swarm Mode Clustering
  • 17.
    OpenFaaS Demo Architecture EF I C O D E . C O M Serverless (OpenFaaS) Serverless Infra Function Container Serverless Function Computing resources Virtual- and/or physical- servers Docker Container Platform(s) Docker Swarm Mode Clustering
  • 18.
    OpenFaaS Demo Architecture EF I C O D E . C O M Serverless (OpenFaaS) Serverless Infra Function Container Serverless Function Computing resources Virtual- and/or physical- servers Docker Container Platform(s) Docker Swarm Mode Clustering
  • 19.
    OpenFaaS Demo Architecture EF I C O D E . C O M Serverless (OpenFaaS) Serverless Infra Function Container Serverless Function Computing resources Virtual- and/or physical- servers Docker Container Platform(s) Docker Swarm Mode Clustering
  • 20.
  • 21.
    THANK YOU E FI C O D E . C O M Sakari Hoisko Senior Devops Consultant sakari.hoisko@eficode.com Mikki Levón Software Engineer mikki.levon@eficode.com https://www.linkedin.com/in/mikki-levon/