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

TechTalks - Auto-scaling containers with KEDA

9e33a1d43a88f23f6c545c1e0f07f4b5?s=47 Nilesh Gule
September 18, 2019

TechTalks - Auto-scaling containers with KEDA

Slidedeck from the TechTalks meetup (https://www.meetup.com/techtalkssg/events/264664700/) on Auto-scaling containers with KEDA. The talk demonstrates KEDA capabilities with 2 different examples. One using Azure Container Instances with Node.js consumer for Azure Storage Queues. The second example is of .Net Core RabbitMQ consumer running in the containerized environment on Azure Kubernetes Service.

9e33a1d43a88f23f6c545c1e0f07f4b5?s=128

Nilesh Gule

September 18, 2019
Tweet

More Decks by Nilesh Gule

Other Decks in Technology

Transcript

  1. Auto-Scaling containers with Nilesh Gule @nileshgule | www.HandsOnArchitect.com

  2. $whoami { “name” : “Nilesh Gule”, “website” : “https://www.HandsOnArchitect.com", “github”

    : “https://github.com/NileshGule" “twitter” : “@nileshgule”, “linkedin” : “https://www.linkedin.com/in/nileshgule”, “email” : “nileshgule@gmail.com", “likes” : “Technical Evangelism, Cricket” }
  3. None
  4. None
  5. None
  6. Pros Cons Scale k8s objects: Kubectl scale –replicas=3 processor-deployment.yml Kubectl

    scale –replicas=3 deployment/rabbitmq-consumer Scale AKS cluster: az aks scale --resource-group myResourceGroup \ --name myAKSCluster \ --node-count 1 \ --nodepool-name <your node pool name>
  7. Pros Cons kubectl autoscale deployment php-apache \ --cpu-percent=50 \ --min=1

    \ --max=10
  8. None
  9. Pros Cons

  10. Pros Cons

  11. Kubernetes-based Event Driven Autoscaling

  12. None
  13. None
  14. None
  15. Demo Autoscaling Storage Queue consumer with ACI

  16. 5000 messages

  17. apiVersion: keda.k8s.io/v1alpha1 kind: ScaledObject metadata: name: hello-keda namespace: default labels:

    deploymentName: hello-keda spec: scaleTargetRef: deploymentName: hello-keda pollingInterval: 5 # Optional. Default: 30 seconds maxReplicaCount: 15 # Optional. Default: 100 triggers: - type: azure-queue metadata: name: myQueueItem type: queueTrigger direction: in queueName: js-queue-items connection: AzureWebJobsStorage
  18. Demo Autoscaling RabbitMQ

  19. https://github.com/NileshGule/AKS-learning-series

  20. 1000 messages 10 messages

  21. apiVersion: keda.k8s.io/v1alpha1 kind: ScaledObject metadata: name: rabbitmq-consumer namespace: default labels:

    deploymentName: rabbitmq-consumer spec: scaleTargetRef: deploymentName: rabbitmq-consumer pollingInterval: 5 # Optional. Default: 30 seconds cooldownPeriod: 30 # Optional. Default: 300 seconds minReplicaCount: 1 # Optional. Default: 0 maxReplicaCount: 30 # Optional. Default: 100 triggers: - type: rabbitmq metadata: queueName: hello host: 'amqp://user:PASSWORD@rabbitmq.default.svc.cluster.local:5672’ queueLength : '5'
  22. AKS cluster-autoscalar Virtual Node Horizontal pod autoscale virtual kubelet KEDA

    Azure Function with Queue
  23. None
  24. None
  25. Thank you very much Code with Passion and Strive for

    Excellence https://github.com/NileshGule/AKS-learning-series https://github.com/NileshGule/pd-tech-fest-2019 https://github.com/NileshGule/sample-dotnet-core-rabbitmq-keda https://www.slideshare.net/nileshgule/presentations https://speakerdeck.com/nileshgule/
  26. Q&A