SlideShare a Scribd company logo
Jules Testard
Software Engineer, Docker
Inc
Docker Containers in
the Serverless World
What is Serverless?
● Serverless: also called FaaS
● FaaS: Function-As-A-Service
● Programming model in which applications are written as a set of
“functions”, run in ephemeral containers
package function
import (
"encoding/json"
)
// Handle a serverless request
func Handle(req []byte) string {
var e CloudEvent
if err := json.Unmarshal(req, &e); err != nil {
panic(err)
}
if Authenticate(e.Data) {
return "authentication successful"
}
return "authentication failed"
}
What is Serverless?
Public Cloud FaaS
● Public cloud manages the
function lifecycle and execution
● “Pay-as-you-go” model. Pricing is
based on actual amount of
resources consumed by the
function execution
● Pioneered by AWS, with AWS
Lambda (2014)
Private/Installable FaaS
● Installed using an orchestrator
such as Docker Swarm or
Kubernetes on a cluster
● Function management and
lifecycle handled in orchestrator.
● More recently developed (2016).
● Serverless: also called FaaS
● FaaS: Function-As-A-Service
● Programming model in which applications are written as a set of
“functions”, run in ephemeral containers
Serverless Pros
● Eliminates server maintenance
○ Developer time is spent on building actual value
○ (installable framework) -> maintenance goes to ops team
● Automatic Scaling
● Significant Price Drop
● Modernize traditional application (MTA)
LibHive: 90% cost reduction on small app
Small web app running on
AWS using a public cloud application
moved to AWS
Lambda
application fully
managed by Ec2
and ELB
HeavyWater: from 30,000$/mo to 3700$/mo
HeavyWater processes
files in batch using AWS
1000 Ec2 machines
200 Ec2
machines
39M AWS
Lambda
invocations
Serverless Cons
● (Still) hard to observe
● Cold Starts*
● Hard to hire knowledgeable developers
○ ecosystem is very new
● Each platform has specific tools
○ No common tooling
● Heavier reliance on vendor ecosystems
Public or Installable?
Public over Installable:
● Free below free tier
○ i.e. AWS Lambda has 1M requests/mo for free
● No ops team required
● Integrated within each cloud
○ i.e. a cloudwatch event can trigger an AWS Lambda
call
Public or Installable?
Installable over Public:
● Can be much more performant if properly configured
● Functions can be as big as you like* and run for as
long as you like
● Can be much cheaper on large scale (back of the
envelope
● Can run without the internet
*: within available resources
FaaS in 2018
Source: CNCF Serverless WG Our Focus
Overview of (some) open source
serverless frameworks
● Creator: Alex Ellis, launched at DockerCon17
● Github stars: 12,100
● Start Date: Dec 18, 2016
● Contributors: 83
● Runs on Kubernetes and Swarm
RESTful
entrypoint
(CLI/API/WEB)
Metrics
Entrypoint
for function
process
Orchestrator
OpenFaaS example: authentication
package function
import (
"encoding/json"
)
// Handle a serverless request
func Handle(req []byte) string {
var e CloudEvent
if err := json.Unmarshal(req, &e); err != nil {
panic(err)
}
if Authenticate(e.Data) {
return "authentication successful"
}
return "authentication failed"
}
provider:
name: faas
gateway: http://12.123.123.123:33000
functions:
simple-auth:
lang: go
handler: ./simple-auth
image: julestestard/simpleauth
DTR
Docker
Hub
1. faas-cli build
2. faas-cli push
function
3. faas-cli deploy
function
4. faas-cli invoke
function
Native Tooling: faas-cli
Open FaaS Demo
● Github stars: 2,300
● Starte Date: Jun 4, 2017
● Focuses on data processing and
performance
● Contributors: 33
● Runs on Kubernetes
● Sponsored by Iguazio
Pod
Creates function artifact
(runs in CLI context)
Kubernetes deployment
Kubernetes deployment
Nuclio example: authentication
package main
import (
"encoding/json"
"github.com/nuclio/nuclio-sdk-go"
)
// Handle a serverless request
func Handler(context *nuclio.Context, event nuclio.Event) (interface{}, error) {
var e CloudEvent
if err := json.Unmarshal(event.GetBody(), &e); err != nil {
return nil, err
}
if Authenticate(e.Data) {
return "authentication successful", nil
}
return "authentication denied", nil
}
relies on nuclio SDK
Any host
nuctl build
processor-simple-auth
image
apiVersion:
"nuclio.io/v1"
kind: Function
metadata:
name: simple-auth
namespace: nuclio
spec:
runtime: golang
handler: main:Handler
minReplicas: 0
maxReplicas: 10
Any host
nuctl deploy
Function CRD
Nuclio Demo
Knative
● Kubernetes-based platform to build, deploy,
and manage modern serverless workloads.
● Release Date: Jun 4, 2018 (currently at v0.2)
● Contributors: 50
● Runs on Kubernetes
● Sponsored by Google, Pivotal, IBM, Red Hat,
and SAP
Knative
Knative
Function developers
Function framework
maintainers
DTR
Docker
Hub
1. faas-cli build
2. faas-cli push
function
Istio
Envoy
Istio
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
name: knative-hello-world
namespace: default
spec:
runLatest:
configuration:
revisionTemplate:
spec:
container:
image: julestestard/hello-world-http
kube api
server
Envoy5. curl -v -X POST
-d $data -H "Host:
knative-hello-world-
openfaas.default.ex
ample.com"
http://...
4. deploy knative
serving
kubectl apply
serving.knative
service
kube deployment
for function
replicas=0
knative hello-world pod
knative hello-world pod
knative hello-world pod
kube deployment
for function
replicas=3
OpenFaaS Knative Demo
Tools which will influence the future of FaaS:
- CloudFlare isolates
- AWS FireCracker
- Pulumi
New Trends
CloudFlare Isolates
● All functions which use the same runtime will use the same process
● Node JS runtime overhead: 35MB
● Node JS runtime using CloudFlag isolates: 3MB
AWS Firecracker
● Open Source Project
● Designed for multi-tenant function
services
● MicroVM: lightweight virtual machine
● Same hardware-virtualization-based
security as VMs
● Almost as fast to start as a container
Pulumi
Cloud Native Infrastructure as Code on any cloud with real
programming languages
Thank you!
Jules Testard
Install OpenFaas, Nuclio and Knative
on Docker EE and code samples

More Related Content

PDF
DCEU 18: App-in-a-Box with Docker Application Packages
PDF
Docker on docker leveraging kubernetes in docker ee
PDF
DCEU 18: State of the Docker Engine
PDF
DCEU 18: Building Your Development Pipeline
PDF
DCSF19 How To Build Your Containerization Strategy
PDF
DCEU 18: From Legacy Mainframe to the Cloud: The Finnish Railways Evolution w...
PDF
How to build your containerization strategy
PDF
DCSF19 Deploying Istio as an Ingress Controller
DCEU 18: App-in-a-Box with Docker Application Packages
Docker on docker leveraging kubernetes in docker ee
DCEU 18: State of the Docker Engine
DCEU 18: Building Your Development Pipeline
DCSF19 How To Build Your Containerization Strategy
DCEU 18: From Legacy Mainframe to the Cloud: The Finnish Railways Evolution w...
How to build your containerization strategy
DCSF19 Deploying Istio as an Ingress Controller

What's hot (20)

PPTX
Docker Online Meetup: Announcing Docker CE + EE
PDF
Considerations for operating docker at scale
PPTX
DockerCon EU 2015: Placing a container on a train at 200mph
PDF
Docker?!?! But I'm a SysAdmin
PDF
Building Your Docker Swarm Tech Stack
PDF
Node.js Rocks in Docker for Dev and Ops
PDF
Tales of Training: Scaling CodeLabs with Swarm Mode and Docker-Compose
PDF
DCEU 18: Docker Container Security
PDF
DCEU 18: Docker Container Networking
PDF
Automated hardware testing using docker for space
PDF
Build & Deploy Multi-Container Applications to AWS
PDF
Activision's Skypilot: Delivering Amazing Game Experiences Through Containeri...
PDF
Docker for developers on mac and windows
PDF
A vision of persistence
PDF
Docker on Docker
PDF
How to accelerate docker adoption with a simple and powerful user experience
PDF
Docker for .NET Developers - Michele Leroux Bustamante, Solliance
PDF
Docker Store: The New Destination for Enterprise Software - Lily Guo and Alfr...
PDF
Docker ee an architecture and operations overview
PDF
Docker Multi-arch All The Things
Docker Online Meetup: Announcing Docker CE + EE
Considerations for operating docker at scale
DockerCon EU 2015: Placing a container on a train at 200mph
Docker?!?! But I'm a SysAdmin
Building Your Docker Swarm Tech Stack
Node.js Rocks in Docker for Dev and Ops
Tales of Training: Scaling CodeLabs with Swarm Mode and Docker-Compose
DCEU 18: Docker Container Security
DCEU 18: Docker Container Networking
Automated hardware testing using docker for space
Build & Deploy Multi-Container Applications to AWS
Activision's Skypilot: Delivering Amazing Game Experiences Through Containeri...
Docker for developers on mac and windows
A vision of persistence
Docker on Docker
How to accelerate docker adoption with a simple and powerful user experience
Docker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker Store: The New Destination for Enterprise Software - Lily Guo and Alfr...
Docker ee an architecture and operations overview
Docker Multi-arch All The Things
Ad

Similar to DCEU 18: Docker Containers in a Serverless World (20)

PDF
Making Service Deployments to AWS a breeze with Nova
PDF
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
PDF
Kubernetes for the PHP developer
PDF
Get you Java application ready for Kubernetes !
PPTX
ILM - Pipeline in the cloud
PDF
Running your dockerized application(s) on AWS Elastic Container Service
PDF
Introduction to kubernetes
PDF
Build your operator with the right tool
PDF
Kubernetes - training micro-dragons without getting burnt
PPTX
Containers&Orchestration Approaches
PDF
Docker for dev
PDF
The path to a serverless-native era with Kubernetes
PDF
Application Deployment on Openstack
PDF
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
PDF
Build Your Kubernetes Operator with the Right Tool!
PDF
Containers and Orchestration approaches
PPTX
Docker Platform and Ecosystem Nov 2015
KEY
Building production-quality apps with Node.js
PDF
Knative build for open whisk runtimes phase 1 - 2018-02-20
PPTX
Docker Enterprise Workshop - Technical
Making Service Deployments to AWS a breeze with Nova
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
Kubernetes for the PHP developer
Get you Java application ready for Kubernetes !
ILM - Pipeline in the cloud
Running your dockerized application(s) on AWS Elastic Container Service
Introduction to kubernetes
Build your operator with the right tool
Kubernetes - training micro-dragons without getting burnt
Containers&Orchestration Approaches
Docker for dev
The path to a serverless-native era with Kubernetes
Application Deployment on Openstack
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Build Your Kubernetes Operator with the Right Tool!
Containers and Orchestration approaches
Docker Platform and Ecosystem Nov 2015
Building production-quality apps with Node.js
Knative build for open whisk runtimes phase 1 - 2018-02-20
Docker Enterprise Workshop - Technical
Ad

More from Docker, Inc. (20)

PDF
Containerize Your Game Server for the Best Multiplayer Experience
PDF
How to Improve Your Image Builds Using Advance Docker Build
PDF
Build & Deploy Multi-Container Applications to AWS
PDF
Securing Your Containerized Applications with NGINX
PDF
How To Build and Run Node Apps with Docker and Compose
PDF
Hands-on Helm
PDF
Distributed Deep Learning with Docker at Salesforce
PDF
The First 10M Pulls: Building The Official Curl Image for Docker Hub
PDF
Monitoring in a Microservices World
PDF
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
PDF
Predicting Space Weather with Docker
PDF
Become a Docker Power User With Microsoft Visual Studio Code
PDF
How to Use Mirroring and Caching to Optimize your Container Registry
PDF
Monolithic to Microservices + Docker = SDLC on Steroids!
PDF
Kubernetes at Datadog Scale
PDF
Labels, Labels, Labels
PDF
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
PDF
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
PDF
Developing with Docker for the Arm Architecture
PDF
Sharing is Caring: How to Begin Speaking at Conferences
Containerize Your Game Server for the Best Multiplayer Experience
How to Improve Your Image Builds Using Advance Docker Build
Build & Deploy Multi-Container Applications to AWS
Securing Your Containerized Applications with NGINX
How To Build and Run Node Apps with Docker and Compose
Hands-on Helm
Distributed Deep Learning with Docker at Salesforce
The First 10M Pulls: Building The Official Curl Image for Docker Hub
Monitoring in a Microservices World
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
Predicting Space Weather with Docker
Become a Docker Power User With Microsoft Visual Studio Code
How to Use Mirroring and Caching to Optimize your Container Registry
Monolithic to Microservices + Docker = SDLC on Steroids!
Kubernetes at Datadog Scale
Labels, Labels, Labels
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
Developing with Docker for the Arm Architecture
Sharing is Caring: How to Begin Speaking at Conferences

Recently uploaded (20)

PDF
Machine learning based COVID-19 study performance prediction
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
cuic standard and advanced reporting.pdf
PDF
Approach and Philosophy of On baking technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPT
Teaching material agriculture food technology
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Machine learning based COVID-19 study performance prediction
“AI and Expert System Decision Support & Business Intelligence Systems”
NewMind AI Weekly Chronicles - August'25 Week I
MYSQL Presentation for SQL database connectivity
Unlocking AI with Model Context Protocol (MCP)
Spectral efficient network and resource selection model in 5G networks
Review of recent advances in non-invasive hemoglobin estimation
Dropbox Q2 2025 Financial Results & Investor Presentation
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
NewMind AI Monthly Chronicles - July 2025
cuic standard and advanced reporting.pdf
Approach and Philosophy of On baking technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Teaching material agriculture food technology
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...

DCEU 18: Docker Containers in a Serverless World

  • 1. Jules Testard Software Engineer, Docker Inc Docker Containers in the Serverless World
  • 2. What is Serverless? ● Serverless: also called FaaS ● FaaS: Function-As-A-Service ● Programming model in which applications are written as a set of “functions”, run in ephemeral containers package function import ( "encoding/json" ) // Handle a serverless request func Handle(req []byte) string { var e CloudEvent if err := json.Unmarshal(req, &e); err != nil { panic(err) } if Authenticate(e.Data) { return "authentication successful" } return "authentication failed" }
  • 3. What is Serverless? Public Cloud FaaS ● Public cloud manages the function lifecycle and execution ● “Pay-as-you-go” model. Pricing is based on actual amount of resources consumed by the function execution ● Pioneered by AWS, with AWS Lambda (2014) Private/Installable FaaS ● Installed using an orchestrator such as Docker Swarm or Kubernetes on a cluster ● Function management and lifecycle handled in orchestrator. ● More recently developed (2016). ● Serverless: also called FaaS ● FaaS: Function-As-A-Service ● Programming model in which applications are written as a set of “functions”, run in ephemeral containers
  • 4. Serverless Pros ● Eliminates server maintenance ○ Developer time is spent on building actual value ○ (installable framework) -> maintenance goes to ops team ● Automatic Scaling ● Significant Price Drop ● Modernize traditional application (MTA)
  • 5. LibHive: 90% cost reduction on small app Small web app running on AWS using a public cloud application moved to AWS Lambda application fully managed by Ec2 and ELB
  • 6. HeavyWater: from 30,000$/mo to 3700$/mo HeavyWater processes files in batch using AWS 1000 Ec2 machines 200 Ec2 machines 39M AWS Lambda invocations
  • 7. Serverless Cons ● (Still) hard to observe ● Cold Starts* ● Hard to hire knowledgeable developers ○ ecosystem is very new ● Each platform has specific tools ○ No common tooling ● Heavier reliance on vendor ecosystems
  • 8. Public or Installable? Public over Installable: ● Free below free tier ○ i.e. AWS Lambda has 1M requests/mo for free ● No ops team required ● Integrated within each cloud ○ i.e. a cloudwatch event can trigger an AWS Lambda call
  • 9. Public or Installable? Installable over Public: ● Can be much more performant if properly configured ● Functions can be as big as you like* and run for as long as you like ● Can be much cheaper on large scale (back of the envelope ● Can run without the internet *: within available resources
  • 11. Source: CNCF Serverless WG Our Focus
  • 12. Overview of (some) open source serverless frameworks
  • 13. ● Creator: Alex Ellis, launched at DockerCon17 ● Github stars: 12,100 ● Start Date: Dec 18, 2016 ● Contributors: 83 ● Runs on Kubernetes and Swarm
  • 15. OpenFaaS example: authentication package function import ( "encoding/json" ) // Handle a serverless request func Handle(req []byte) string { var e CloudEvent if err := json.Unmarshal(req, &e); err != nil { panic(err) } if Authenticate(e.Data) { return "authentication successful" } return "authentication failed" } provider: name: faas gateway: http://12.123.123.123:33000 functions: simple-auth: lang: go handler: ./simple-auth image: julestestard/simpleauth
  • 16. DTR Docker Hub 1. faas-cli build 2. faas-cli push function 3. faas-cli deploy function 4. faas-cli invoke function Native Tooling: faas-cli
  • 18. ● Github stars: 2,300 ● Starte Date: Jun 4, 2017 ● Focuses on data processing and performance ● Contributors: 33 ● Runs on Kubernetes ● Sponsored by Iguazio
  • 19. Pod Creates function artifact (runs in CLI context) Kubernetes deployment Kubernetes deployment
  • 20. Nuclio example: authentication package main import ( "encoding/json" "github.com/nuclio/nuclio-sdk-go" ) // Handle a serverless request func Handler(context *nuclio.Context, event nuclio.Event) (interface{}, error) { var e CloudEvent if err := json.Unmarshal(event.GetBody(), &e); err != nil { return nil, err } if Authenticate(e.Data) { return "authentication successful", nil } return "authentication denied", nil } relies on nuclio SDK
  • 22. apiVersion: "nuclio.io/v1" kind: Function metadata: name: simple-auth namespace: nuclio spec: runtime: golang handler: main:Handler minReplicas: 0 maxReplicas: 10 Any host nuctl deploy Function CRD
  • 24. Knative ● Kubernetes-based platform to build, deploy, and manage modern serverless workloads. ● Release Date: Jun 4, 2018 (currently at v0.2) ● Contributors: 50 ● Runs on Kubernetes ● Sponsored by Google, Pivotal, IBM, Red Hat, and SAP
  • 27. DTR Docker Hub 1. faas-cli build 2. faas-cli push function Istio Envoy
  • 28. Istio apiVersion: serving.knative.dev/v1alpha1 kind: Service metadata: name: knative-hello-world namespace: default spec: runLatest: configuration: revisionTemplate: spec: container: image: julestestard/hello-world-http kube api server Envoy5. curl -v -X POST -d $data -H "Host: knative-hello-world- openfaas.default.ex ample.com" http://... 4. deploy knative serving kubectl apply serving.knative service kube deployment for function replicas=0 knative hello-world pod knative hello-world pod knative hello-world pod kube deployment for function replicas=3
  • 30. Tools which will influence the future of FaaS: - CloudFlare isolates - AWS FireCracker - Pulumi New Trends
  • 31. CloudFlare Isolates ● All functions which use the same runtime will use the same process ● Node JS runtime overhead: 35MB ● Node JS runtime using CloudFlag isolates: 3MB
  • 32. AWS Firecracker ● Open Source Project ● Designed for multi-tenant function services ● MicroVM: lightweight virtual machine ● Same hardware-virtualization-based security as VMs ● Almost as fast to start as a container
  • 33. Pulumi Cloud Native Infrastructure as Code on any cloud with real programming languages
  • 34. Thank you! Jules Testard Install OpenFaas, Nuclio and Knative on Docker EE and code samples