Upgrade to Pro — share decks privately, control downloads, hide ads and more …

KEDA - Mastering Scale to Zero by Daniel Hasselwander

KEDA - Mastering Scale to Zero by Daniel Hasselwander

Slides from the following meetup: https://www.meetup.com/de-DE/microsoft-azure-zurich-user-group/events/292938328/

KEDA is an Event Driven Autoscaler for workloads running on Kubernetes. It provides mechanisms to scale those workloads depending on external systems, such as messaging or telemetry systems.

This talk will provide an introduction to KEDA and the underlying concepts. The usage of KEDA will be demonstrated on Azure with an AKS cluster running a demo application, which is autoscaled through KEDA. We will see how to setup KEDA and configure it to scale the application depending on the amount of messages in an Azure Service Bus Topic

About Daniel:
I have been working as an Azure Engineer at ti&m in Zurich since 2021. Ti&m is an IT service provider offering services along the entire IT value chain. My role is to support customers in the selection of Azure Cloud components and to implement them afterwards. My main technologies are container technologies (e.g. AKS) and Terraform as an IaaC tool.

https://www.linkedin.com/in/daniel-ha%C3%9Felwander-786826137/

More Decks by Azure Zurich User Group

Other Decks in Technology

Transcript

  1. Keda
    Mastering Scale-to-Zero
    Daniel Hasselwander
    Zürich, 16.05.2023
    Azure Zürich User Group

    View full-size slide

  2. It is Monday 10AM, now
    Some person leaves the house and goes to work

    View full-size slide

  3. Why is this situation important for today

    View full-size slide

  4. What is a good software ?

    View full-size slide

  5. Doing the right things, with as little cost
    in operations as possible

    View full-size slide

  6. Same Picture – another Situation

    View full-size slide

  7. Node 1 Node 2 Node 3 Node 4

    View full-size slide

  8. It is Sunday, now

    View full-size slide

  9. Node 1 Node 2 Node 3 Node 4

    View full-size slide

  10. What we want

    View full-size slide

  11. Node 1 Node 2

    View full-size slide

  12. Our Path
    What is
    Keda
    What we
    want
    How it
    works
    Demo

    View full-size slide

  13. Scale-To-Zero
    What we want ?
    Scale Workload
    on external
    metric
    1 0
    or
    0 1

    View full-size slide

  14. What is Keda ?
    − Kubernetes-based Event Driven Autoscaler
    − Works alongside standard components
    − Installable with helm
    − Doku on keda.sh

    View full-size slide

  15. Agent – Scale to Zero
    activate and deactivate
    Deployments
    «keda-operator» container
    How it works ? KEDA Parts
    Metrics Server
    exposes event data for HPA to
    scale out
    «keda-operator-metrics-
    apiserver» container

    View full-size slide

  16. ScaledObjects
    Events Deployment etc.
    How it works ? Custom Ressources (CRD)
    ScaledJobs
    Events Kubernetes Job
    TriggerAuthentication
    Namespace useable
    credentials
    ClusterTriggerAuthentication
    Cluster useable credentials

    View full-size slide

  17. But what if my application work with http requests

    View full-size slide

  18. KEDA – HTTP Scaler
    − An HTTP "event" is not well defined
    − no out-of-the-box single system that can provide an API
    to measure the current number of incoming HTTP
    events or requests.
    − must to be integrated into the HTTP routing system

    View full-size slide

  19. KEDA – HTTP Scaler Add-On
    − KEDA core project has purposely not built generic
    HTTP-based scaling
    − Beta Status
    − Try it and give the community feedback
    − GitHub - kedacore/http-add-on: Add-on for KEDA to
    scale HTTP workloads

    View full-size slide

  20. Node 1 Node 2 Node 3 Node 4

    View full-size slide

  21. It is the next Sunday, now

    View full-size slide

  22. Node 1 Node 2

    View full-size slide

  23. KEDA – When to use it
    − Can be your default scale mechanism
    − Scale-To-Zero != Realtime
    − Azure Function in your Cluster

    View full-size slide

  24. KEDA – Good to know
    − Short polling only for activate deployment
    − Don´t combine ScaleObject with HPA
    − Can use multiple scaler
    − Scale on your own systems
    − Azure CLI implement a KEDA extension for Functions

    View full-size slide

  25. The Code is published on Github
    Hassel93/cn_meetup_keda: Repository with all used files
    for demo of (github.com)

    View full-size slide

  26. Thank you for your attention !
    Questions ?

    View full-size slide