Application Autoscaling Made Easy
with Kubernetes Event-Driven
Autoscaling (KEDA)
Jeff Hollan, Microsoft, Principal Product Manager Azure Functions
Tom Kerkhove, Codit, Azure Architect and Microsoft MVP
1
Jeff Hollan
Principle Program Manager at Microsoft
KEDA maintainer
2
Tom Kerkhove
Azure Architect at Codit, Microsoft MVP
KEDA maintainer
Agenda
| Serverless and Kubernetes
| Application autoscaling made simple
with KEDA
| How does it work?
| Roadmap
| Q&A
3
How we see serverless used?
4
Automation “Glue” between
services
Rapid APIs Event Stream and
Queue processing
Event Hub
/ Kafka
CosmosDB
/ Mongo
• Must be able to
scale to billions of
events
• If an error occurs,
Kafka should retry /
not checkpoint
• Cost optimization is
high-pri
• Ordering must be
preserved
Serverless and Kubernetes
USE ‘SERVERLESS’ ON-
PREMISES
LEVERAGING EXISTING
KUBERNETES
INVESTMENTS
CUSTOM COMPUTE,
SECURITY, OR NETWORK
REQUIREMENTS
NO VENDOR LOCK-IN
7
So, how do you scale on Kubernetes?
8
8
Node 1
Cluster
Node 2 Node 3
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Custom Metric
Provider
Horizontal Pod
Autoscaler(s)
Cluster
Autoscaler
Autoscaling based on external sources
9
Application autoscaling made simple with
Kubernetes Event-driven Autoscaling ( )
10
| Automatically scale Deployments & Jobs
| Vendor-Agnostic & Built-in Scalers
| Production-grade Authentication
| Save resources with scale to 0
| Run Azure Functions anywhere (simple & durable)
| Started as a partnership between Microsoft & Red Hat
| Focus on your app scaling, not the scaling internals
11
KEDA is cloud-agnostic & vendor-neutral
KEDA is cloud-agnostic & vendor-neutral
Demo
Autoscaling .NET Core worker based on Azure Service Bus queue depth
12
How does it work?
13
| KEDA is built on top of Kubernetes
| Manages workloads to provide scale to 0
| Registers itself as a metric adapter
| Provides metrics for HPA to scale on
| Out-of-the-box & add-on scalers
| Easy to install
| With Helm
| https://hub.helm.sh/charts/kedacore/keda
| With Operator Framework
| https://operatorhub.io/operator/keda
14
15
16
16
Node 1 Node 2 Node 3
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Cluster
Autoscaler
Custom Metric
Provider
Horizontal Pod
Autoscaler(s)
Cluster
Kubernetes Cluster
KEDA Operator Metrics API HPA
Scalers
Kubernetes Cluster
Event Source
KEDA Operator Metrics API HPA
Scalers
Kubernetes Cluster
KEDA Operator Metrics API HPA
Scalers
Deployment
ScaledObject.yaml
Event Source
Kubernetes Cluster
KEDA Operator Metrics API HPA
Scalers
Deployment
ScaledObject.yaml
Event Source
Kubernetes Cluster
KEDA Operator Metrics API HPA
Scalers
Event Source Deployment
ScaledObject.yaml
Kubernetes Cluster
KEDA Operator Metrics API HPA
Scalers
Event Source Deployment
ScaledObject.yaml
How many events are
being generated?
Kubernetes Cluster
KEDA Operator Metrics API HPA
Scalers
Event Source Deployment
ScaledObject.yaml
How many events are
being generated?
Kubernetes Cluster
KEDA Operator Metrics API
Deployment
HPA
Deployment
Scalers
Event Source Deployment
ScaledObject.yaml
How many events are
being generated?
Community
25
| 1.8k stars on GitHub
| 50 contributors, incl.
| Microsoft
| Red Hat
| IBM
| Codit
| BUPA
| Astronomer.io
| Bi-weekly community standups
| https://keda.sh
Microsoft Kubernetes
Benefits of using Azure Functions with KEDA
27
| Brings an event driven *programming model* to KEDA event driven scale
| Same productive developer tooling and experience
| Any function app can be put in a container and scaled with KEDA
| Azure Functions is already open sourced – but are doing more and
considering branding to make that more apparent
Roadmap
28
| We are donating KEDA to Cloud Native Computing Foundation (CNCF) as
Sandbox project
| Seamless integration with Knative
| Introduce new scalers
| Azure Monitor
| Service Mesh Interface (SMI)
| Azure IoT Hub
| What do you need?
Q&A
29

Application Autoscaling Made Easy with Kubernetes Event-Driven Autoscaling (KEDA)

  • 1.
    Application Autoscaling MadeEasy with Kubernetes Event-Driven Autoscaling (KEDA) Jeff Hollan, Microsoft, Principal Product Manager Azure Functions Tom Kerkhove, Codit, Azure Architect and Microsoft MVP 1
  • 2.
    Jeff Hollan Principle ProgramManager at Microsoft KEDA maintainer 2 Tom Kerkhove Azure Architect at Codit, Microsoft MVP KEDA maintainer
  • 3.
    Agenda | Serverless andKubernetes | Application autoscaling made simple with KEDA | How does it work? | Roadmap | Q&A 3
  • 4.
    How we seeserverless used? 4 Automation “Glue” between services Rapid APIs Event Stream and Queue processing
  • 5.
    Event Hub / Kafka CosmosDB /Mongo • Must be able to scale to billions of events • If an error occurs, Kafka should retry / not checkpoint • Cost optimization is high-pri • Ordering must be preserved
  • 6.
    Serverless and Kubernetes USE‘SERVERLESS’ ON- PREMISES LEVERAGING EXISTING KUBERNETES INVESTMENTS CUSTOM COMPUTE, SECURITY, OR NETWORK REQUIREMENTS NO VENDOR LOCK-IN
  • 7.
    7 So, how doyou scale on Kubernetes?
  • 8.
    8 8 Node 1 Cluster Node 2Node 3 Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Custom Metric Provider Horizontal Pod Autoscaler(s) Cluster Autoscaler
  • 9.
    Autoscaling based onexternal sources 9
  • 10.
    Application autoscaling madesimple with Kubernetes Event-driven Autoscaling ( ) 10 | Automatically scale Deployments & Jobs | Vendor-Agnostic & Built-in Scalers | Production-grade Authentication | Save resources with scale to 0 | Run Azure Functions anywhere (simple & durable) | Started as a partnership between Microsoft & Red Hat | Focus on your app scaling, not the scaling internals
  • 11.
    11 KEDA is cloud-agnostic& vendor-neutral KEDA is cloud-agnostic & vendor-neutral
  • 12.
    Demo Autoscaling .NET Coreworker based on Azure Service Bus queue depth 12
  • 13.
    How does itwork? 13 | KEDA is built on top of Kubernetes | Manages workloads to provide scale to 0 | Registers itself as a metric adapter | Provides metrics for HPA to scale on | Out-of-the-box & add-on scalers | Easy to install | With Helm | https://hub.helm.sh/charts/kedacore/keda | With Operator Framework | https://operatorhub.io/operator/keda
  • 14.
  • 15.
  • 16.
    16 16 Node 1 Node2 Node 3 Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Cluster Autoscaler Custom Metric Provider Horizontal Pod Autoscaler(s) Cluster
  • 17.
    Kubernetes Cluster KEDA OperatorMetrics API HPA Scalers
  • 18.
    Kubernetes Cluster Event Source KEDAOperator Metrics API HPA Scalers
  • 19.
    Kubernetes Cluster KEDA OperatorMetrics API HPA Scalers Deployment ScaledObject.yaml Event Source
  • 20.
    Kubernetes Cluster KEDA OperatorMetrics API HPA Scalers Deployment ScaledObject.yaml Event Source
  • 21.
    Kubernetes Cluster KEDA OperatorMetrics API HPA Scalers Event Source Deployment ScaledObject.yaml
  • 22.
    Kubernetes Cluster KEDA OperatorMetrics API HPA Scalers Event Source Deployment ScaledObject.yaml How many events are being generated?
  • 23.
    Kubernetes Cluster KEDA OperatorMetrics API HPA Scalers Event Source Deployment ScaledObject.yaml How many events are being generated?
  • 24.
    Kubernetes Cluster KEDA OperatorMetrics API Deployment HPA Deployment Scalers Event Source Deployment ScaledObject.yaml How many events are being generated?
  • 25.
    Community 25 | 1.8k starson GitHub | 50 contributors, incl. | Microsoft | Red Hat | IBM | Codit | BUPA | Astronomer.io | Bi-weekly community standups | https://keda.sh
  • 26.
  • 27.
    Benefits of usingAzure Functions with KEDA 27 | Brings an event driven *programming model* to KEDA event driven scale | Same productive developer tooling and experience | Any function app can be put in a container and scaled with KEDA | Azure Functions is already open sourced – but are doing more and considering branding to make that more apparent
  • 28.
    Roadmap 28 | We aredonating KEDA to Cloud Native Computing Foundation (CNCF) as Sandbox project | Seamless integration with Knative | Introduce new scalers | Azure Monitor | Service Mesh Interface (SMI) | Azure IoT Hub | What do you need?
  • 29.