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

Dapr on AKS: building distributed applications with ease

Dapr on AKS: building distributed applications with ease

Presentation I gave at the AKS meetup in Utrecht (NL).

GitHub repo: http://bit.ly/dapr-on-aks

Marc Duiker

March 29, 2023
Tweet

More Decks by Marc Duiker

Other Decks in Technology

Transcript

  1. Dapr on AKS:
    building distributed
    apps with ease

    View Slide

  2. Marc Duiker Azure MVP
    2
    Sr Dev Advocate
    [email protected]
    Dapr Community
    Manager
    ❤️ pixel art

    View Slide

  3. 3
    Building
    block demos
    Deploy
    to AKS
    What is
    Dapr?

    View Slide

  4. What is Dapr?
    4

    View Slide

  5. 5
    E-commerce system
    State
    Management
    Email Payment
    Front-end
    Shipping
    Checkout
    Inventory
    Cart
    Internet
    Queue
    I just want to
    trace my calls
    end-to-end.
    How do I encrypt
    calls with ongoing
    cert rotation?
    How do applications
    discover and call
    each other?
    How do I handle
    failed calls and
    perform retries?
    How do I secure
    access to my
    data layer?
    How do I handle
    state conflicts
    from multiple
    apps?
    How do I
    measure latency
    on my database?
    How do I
    orchestrate
    business logic
    transactions?
    How do I send
    messages to many
    applications?
    Developer
    challenges

    View Slide

  6. 6
    Distributed
    application
    runtime

    View Slide

  7. 7
    Dapr is a portable, event-
    driven, runtime for building
    distributed applications across
    cloud and edge.

    View Slide

  8. 8
    virtual or
    physical machines

    View Slide

  9. 9
    Speeds up microservice
    development by providing
    a common set of building
    block APIs.

    View Slide

  10. 10
    Service
    invocation
    State
    Management
    Publish &
    subscribe
    Bindings
    (input & output)
    Actors Secret
    Stores
    Configuration
    Observability
    Workflows
    Distributed Lock

    View Slide

  11. 11
    HTTP/gRPC
    Dapr API
    Dapr sidecar
    Application
    App

    View Slide

  12. 12
    POST http://localhost:3500/v1.0/invoke/cart/method/order
    GET http://localhost:3500/v1.0/state/inventory/item67
    POST http://localhost:3500/v1.0/publish/order
    GET http://localhost:3500/v1.0/secrets/vault/password42
    GET http://localhost:3500/v1.0-alpha1/workflows/dapr/businessprocess/1234/start
    HTTP/gRPC
    Dapr API
    App

    View Slide

  13. 13
    C#
    Python
    Java
    Script
    Java
    Go
    SDKs

    View Slide

  14. 14
    10th largest
    CNCF project
    Submitted
    to CNCF
    Nov 2021
    Incubation
    maturity
    level
    www.cncf.io/projects/dapr/

    View Slide

  15. 20.5K
    GitHub stars
    2.5K
    Contributors
    +1M
    Docker pulls
    / month
    290k
    Unique doc
    views / month
    5.4k
    Discord members
    15

    View Slide

  16. 16
    Contributing organizations

    View Slide

  17. 17
    Bindings
    Configuration
    State
    Management
    Publish &
    subscribe
    Observability
    Actors
    Secret
    Stores
    Workflows
    Distributed
    Lock
    Components
    AWS
    DynamoDB
    Azure
    CosmosDB
    GCP
    Firebase
    Redis
    Cassandra
    AWS
    SQS
    Azure
    Service Bus
    GCP
    Pub/Sub
    Redis
    RabbitMQ
    AWS
    Secrets mngr
    Azure
    KeyVault
    GCP
    Secret mngr
    HashiCorp
    Vault
    Kubernetes
    Secrets
    AWS
    DynamoDB
    Azure
    CosmosDB
    Redis
    MongoDB
    Postgres
    AWS
    S3
    Azure
    Storage
    GCP
    Storage
    Twilio
    Kafka
    Jeager
    Zipkin
    Prometheus
    App
    Insights
    Datadog
    Redis
    Redis Azure App
    Configuration
    Dapr
    Workflow

    View Slide

  18. 18
    bit.ly/dapr-state-stores

    View Slide

  19. 19
    App
    CosmosDB

    View Slide

  20. 20
    Sidecar
    App
    CosmosDB
    metadata:
    name: mystorage
    spec:
    type: state.azure.cosmosdb
    metadata:
    - name:
    value:
    SaveStateAsync()
    GetStateAsync()
    yaml

    View Slide

  21. 21
    Redis
    metadata:
    name: mystorage
    spec:
    type: state.redis
    metadata:
    - name:
    value:
    Sidecar
    App
    SaveStateAsync()
    GetStateAsync()
    yaml

    View Slide

  22. 22
    Is Dapr a service mesh?

    View Slide

  23. 23
    No.

    View Slide

  24. 24
    Developer centric Infrastructure centric
    Service
    mesh
    docs.dapr.io/concepts/service-mesh/

    Building block APIs & components Network traffic & Routing

    View Slide

  25. Building block demos
    25
    github.com/dapr/quickstarts

    View Slide

  26. 26
    Service
    invocation
    Checkout
    Order
    processor
    POST

    View Slide

  27. 27
    Publish &
    subscribe
    Checkout
    Order
    processor

    View Slide

  28. 28
    State
    Management
    Redis
    Order
    processor

    View Slide

  29. 29
    Deploy to AKS

    View Slide

  30. 30
    Redis
    Pods
    POST /neworder
    Python
    Pod
    read / write
    Node
    Pod
    Operator/Injector/Sentry
    Pods
    Deploy and
    manage Dapr
    Dapr on AKS
    az aks create
    --resource-group dapr-aks-rg
    --name dapr-aks
    --node-count 2
    --enable-addons http_application_routing
    --generate-ssh-keys

    View Slide

  31. 31
    bit.ly/dapr-on-aks

    View Slide

  32. 32

    View Slide

  33. 33

    View Slide

  34. 34

    View Slide

  35. 35

    View Slide

  36. 41
    Building
    block demos
    Deploy
    to AKS
    What is
    Dapr?

    View Slide

  37. Join the Dapr Discord!
    bit.ly/dapr-discord
    📖 docs.dapr.io 📖

    View Slide