Application Autoscaling Made Easy
with Kubernetes Event-Driven
Autoscaling (KEDA)
Tom Kerkhove, Codit, Azure Architect and Microsoft MVP
1
Azure Architect
Microsoft Azure MVP & Advisor
Writes on blog.tomkerkhove.be
Maintainer of Promitor, KEDA & Arcus
Hi, I’m Tom Kerkhove
2
@TomKerkhove
tomkerkhove
Agenda
| Serverless and Kubernetes
| Application autoscaling made simple
with KEDA
| How does it work?
| Roadmap
| Q&A
3
Serverless and Kubernetes
USE ‘SERVERLESS’ ON-
PREMISES
LEVERAGING EXISTING
KUBERNETES
INVESTMENTS
CUSTOM COMPUTE,
SECURITY, OR NETWORK
REQUIREMENTS
NO VENDOR LOCK-IN
5
So, how do you scale on Kubernetes?
6
6
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
7
Application autoscaling made simple with
Kubernetes Event-driven Autoscaling ( )
8
| 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
9
KEDA is cloud-agnostic & vendor-neutral
KEDA is cloud-agnostic & vendor-neutral
Demo
Autoscaling .NET Core worker based on Azure Service Bus queue depth
10
How does it work?
11
| 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
12
13
14
14
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
23
| 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
25
| 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
26
| Seamless integration with Knative & support for HTTP workloads
| Introduce new scalers
| Service Mesh Interface (SMI)
| Azure IoT Hub
| What do you need?
Q&A
27

Global Azure Virtual - Application Autoscaling with KEDA

  • 1.
    Application Autoscaling MadeEasy with Kubernetes Event-Driven Autoscaling (KEDA) Tom Kerkhove, Codit, Azure Architect and Microsoft MVP 1
  • 2.
    Azure Architect Microsoft AzureMVP & Advisor Writes on blog.tomkerkhove.be Maintainer of Promitor, KEDA & Arcus Hi, I’m Tom Kerkhove 2 @TomKerkhove tomkerkhove
  • 3.
    Agenda | Serverless andKubernetes | Application autoscaling made simple with KEDA | How does it work? | Roadmap | Q&A 3
  • 4.
    Serverless and Kubernetes USE‘SERVERLESS’ ON- PREMISES LEVERAGING EXISTING KUBERNETES INVESTMENTS CUSTOM COMPUTE, SECURITY, OR NETWORK REQUIREMENTS NO VENDOR LOCK-IN
  • 5.
    5 So, how doyou scale on Kubernetes?
  • 6.
    6 6 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
  • 7.
    Autoscaling based onexternal sources 7
  • 8.
    Application autoscaling madesimple with Kubernetes Event-driven Autoscaling ( ) 8 | 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
  • 9.
    9 KEDA is cloud-agnostic& vendor-neutral KEDA is cloud-agnostic & vendor-neutral
  • 10.
    Demo Autoscaling .NET Coreworker based on Azure Service Bus queue depth 10
  • 11.
    How does itwork? 11 | 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
  • 12.
  • 13.
  • 14.
    14 14 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
  • 15.
    Kubernetes Cluster KEDA OperatorMetrics API HPA Scalers
  • 16.
    Kubernetes Cluster Event Source KEDAOperator Metrics API HPA Scalers
  • 17.
    Kubernetes Cluster KEDA OperatorMetrics API HPA Scalers Deployment ScaledObject.yaml Event Source
  • 18.
    Kubernetes Cluster KEDA OperatorMetrics API HPA Scalers Deployment ScaledObject.yaml Event Source
  • 19.
    Kubernetes Cluster KEDA OperatorMetrics API HPA Scalers Event Source Deployment ScaledObject.yaml
  • 20.
    Kubernetes Cluster KEDA OperatorMetrics API HPA Scalers Event Source Deployment ScaledObject.yaml How many events are being generated?
  • 21.
    Kubernetes Cluster KEDA OperatorMetrics API HPA Scalers Event Source Deployment ScaledObject.yaml How many events are being generated?
  • 22.
    Kubernetes Cluster KEDA OperatorMetrics API Deployment HPA Deployment Scalers Event Source Deployment ScaledObject.yaml How many events are being generated?
  • 23.
    Community 23 | 1.8k starson GitHub | 50 contributors, incl. | Microsoft | Red Hat | IBM | Codit | BUPA | Astronomer.io | Bi-weekly community standups | https://keda.sh
  • 24.
  • 25.
    Benefits of usingAzure Functions with KEDA 25 | 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
  • 26.
    Roadmap 26 | Seamless integrationwith Knative & support for HTTP workloads | Introduce new scalers | Service Mesh Interface (SMI) | Azure IoT Hub | What do you need?
  • 27.