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/

Azure Zurich User Group
PRO

May 17, 2023
Tweet

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 Slide

  2. View Slide

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

    View Slide

  4. View Slide

  5. Why is this situation important for today

    View Slide

  6. What is a good software ?

    View Slide

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

    View Slide

  8. Same Picture – another Situation

    View Slide

  9. Node 1 Node 2 Node 3 Node 4

    View Slide

  10. It is Sunday, now

    View Slide

  11. Node 1 Node 2 Node 3 Node 4

    View Slide

  12. What we want

    View Slide

  13. Node 1 Node 2

    View Slide

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

    View Slide

  15. Who am I ?

    View Slide

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

    View Slide

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

    View Slide

  18. 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 Slide

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

    View Slide

  20. Demo

    View Slide

  21. Demo 1

    View Slide

  22. Demo 2

    View Slide

  23. But what if my application work with http requests

    View Slide

  24. 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 Slide

  25. 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 Slide

  26. Node 1 Node 2 Node 3 Node 4

    View Slide

  27. It is the next Sunday, now

    View Slide

  28. Node 1 Node 2

    View Slide

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

    View Slide

  30. 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 Slide

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

    View Slide

  32. Thank you for your attention !
    Questions ?

    View Slide