Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Application Autoscaling Made Easy with Kubernetes Event-Driven Autoscaling (KEDA)
1. 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
2. Jeff Hollan
Principle Program Manager at Microsoft
KEDA maintainer
2
Tom Kerkhove
Azure Architect at Codit, Microsoft MVP
KEDA maintainer
3. Agenda
| Serverless and Kubernetes
| Application autoscaling made simple
with KEDA
| How does it work?
| Roadmap
| Q&A
3
4. How we see serverless 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
8. 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
10. 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
13. 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
16. 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
22. Kubernetes Cluster
KEDA Operator Metrics API HPA
Scalers
Event Source Deployment
ScaledObject.yaml
How many events are
being generated?
23. Kubernetes Cluster
KEDA Operator Metrics API HPA
Scalers
Event Source Deployment
ScaledObject.yaml
How many events are
being generated?
24. Kubernetes Cluster
KEDA Operator Metrics API
Deployment
HPA
Deployment
Scalers
Event Source Deployment
ScaledObject.yaml
How many events are
being generated?
25. 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
27. 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
28. 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?