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

Scaling .net Core Containers with Event Driven Workloads

Scaling .net Core Containers with Event Driven Workloads

Slidedeck from the presentation done for the Microsoft Cloud South Florida user group on 28th August 2020. The demo showcases the following aspects:
1- how to containerize .Net Core application
2- How to publish images to private container registry (Azure Container registry)
3 - How to deploy applications to Kubernetes cluster using Manifest files
4 - Scale containers using KEDA
5 - Extend the scaling capabilities to serverless world by using Virtual Node and Azure Contaienr Instances (ACI)

YouTube video recording of the session - https://www.youtube.com/watch?v=9_rxGygUH1Y


Nilesh Gule

August 28, 2020

More Decks by Nilesh Gule

Other Decks in Technology


  1. Nilesh Gule @nileshgule | www.HandsOnArchitect.com Scaling .Net Core Containers with

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

    : “https://GitHub.com/NileshGule" “twitter” : “@nileshgule”, “linkedin” : “https://www.linkedin.com/in/nileshgule”, “likes” : “Technical Evangelism, Cricket”, “co-organizer” : “Azure Singapore UG” }
  3. None
  4. None
  5. @nileshgule RabbitMQ Demo setup 1000 (configurable) messages Batch of 50

    (configurable) messages https://github.com/NileshGule/pd-tech-fest-2019
  6. @nileshgule RabbitMQ Demo setup 1000 (configurable) messages Batch of 50

    (configurable) messages https://github.com/NileshGule/pd-tech-fest-2019  RabbitMQ Messaging layer  Producer produces configurable number of messages  Consumer consumes configurable number of messages in a batch  Consumer simulates a long running process with artificial delay
  7. Demo build & publish docker images

  8. Demo deploy application containers

  9. AKS Managed Identity (aksmqcluster-agentpool) nileshgule/techtalksmqproducer nileshgule/techtalksmqconsumer ngACRRegistry aksmqCluster ngacrregistry.azurecr.io/nileshgule /techtalksmqproducer

    ngacrregistry.azurecr.io/nileshgule/ techtalksmqconsumer Acr pull acrResourceGroup demo-kedaSeriesRG docker push using azure user token Acr login using AAD No need to use Admin user
  10. KEDA Architecture

  11. Azure Event Hub Azure Service Bus Queues and Topics Azure

    Storage Queues Kafka Prometheus RabbitMQ Redis Lists Liiklus NATS AWS CloudWatch AWS Simple Queue Service GCP PubSub Integrates with Azure functions
  12. Demo deploy KEDA on AKS cluster

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

    deploymentName: rabbitmq-consumer-deployment 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 queueLength : ‘5’ authenticationRef: name: trigger-auth-rabbitmq-host
  14. None
  15. Pros Cons

  16. Scale RabbitMQ Consumer with Virtual Node kedaVNet kedaAKSSubnet kedaVirtualNodeSubnet Producer

    - .Net Core API Consumers - .Net Core exe
  17. Demo extend KEDA with Virtual Node

  18. Summary • Self contained application with all its dependencies Docker

    • Orchestrates containers • Self healing • Service discovery • Scaling Kubernetes • Extends Kubernetes with event driven capabilities KEDA
  19. Play with Docker Play with Kubernetes Kubernetes Learning Path :

    MSLearn Linux Academy learning paths
  20. AKS cluster-autoscalar Virtual Node Horizontal pod autoscale virtual kubelet KEDA

    https://azure.microsoft.com/mediahandler/files/resourcefiles/kubernetes-learning- path/Kubernetes%20Learning%20Path%20version%201.0.pdf
  21. None
  22. Azure Kubernetes Service Workshop References

  23. https://github.com/NileshGule/pd-tech-fest-2019

  24. Thank you very much Code with Passion and Strive for

    Excellence https://www.slideshare.net/nileshgule/presentations https://speakerdeck.com/nileshgule/
  25. Nilesh Gule ARCHITECT | MICROSOFT MVP “Code with Passion and

    Strive for Excellence” nileshgule @nileshgule Nilesh Gule NileshGule www.handsonarchitect.com
  26. Q&A