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

Cloud-Native in der Praxis: Moderne End-to-End-Architekturen

Cloud-Native in der Praxis: Moderne End-to-End-Architekturen

Ob Modernisierung oder Neuimplementierung: Heutzutage soll es Cloud-Native sein! Doch was bedeutet Cloud-Native eigentlich – und was bedeutet es nicht? Müssen es wirklich immer und überall zustandslose Microservices sein? In diesem Ganztages-Workshop zeigen Christian Weyer und Thorsten Hans anhand von verteilten Anwendungsarchitekturen und bewährten Patterns, wie Sie Cloud-Native-Anwendungen erstellen können. Durch praxisorientierte Beispiele werden .NET-Architekten und -Entwicklern die unterschiedlichen Herausforderungen aufgezeigt und pragmatische Lösungswege diskutiert. Egal ob Sie als Ziel die lokale Infrastruktur, ein privates Rechenzentrum oder eine Public Cloud wie Azure haben: Bereiten Sie sich und Ihr Team darauf vor, Anwendungen anhand essenzieller Cloud-Native-Attribute wie Konfigurierbarkeit, Überwachbarkeit, Robustheit und Skalierbarkeit zu designen.

Thorsten Hans

September 25, 2023
Tweet

More Decks by Thorsten Hans

Other Decks in Technology

Transcript

  1. § Was SIE ERWARTET
    § Pragmatische Sicht auf Cloud-Native
    § Was? Warum? Wie? Wo?
    § Methodiken, Praktiken & Patterns
    § Verteilte Anwendungen mit Dapr
    § Automatisierung auf allen Ebenen
    § End-to-End Beispielanwendung
    § .NET-Code (und ein bisschen Go)
    § Lokal und in der Cloud
    § Terminal & CLIs
    § Was SIE NICHT ERWARTET
    § Einführung in Docker,
    Kubernetes oder Azure
    § Deep Dives in Docker,
    Kubernetes oder Azure
    § Windows 🙈
    § Klicki-Bunti in Visual Studio 😇
    § Businessaspekte, wie Business
    Domain Modeling oder SaaS
    § Cloud-Native Security
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    Kein Hands-On
    für Teilnehmer
    1

    View full-size slide

  2. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen
    in der Praxis
    Kenny Pflug
    https://thinktecture.com/kenny-pflug
    Software Architect
    @feO2x
    Thorsten Hans
    https://thinktecture.com/thorsten-hans
    Consultant
    @thorstenhans

    View full-size slide

  3. Consultant @ Thinktecture AG
    #Cloud-Native #Kubernetes
    #Azure #WebAssembly
    Thorsten Hans
    Moderne End-to-End-Architekturen in der Praxis
    Cloud-Native-Workshop
    [email protected]
    thinktecture.com
    thorsten-hans.com
    @ThorstenHans

    View full-size slide

  4. § Distributed Systems with ASP.NET Core
    § .NET internals
    § Cloud-native
    [email protected] @feO2x https://www.thinktecture.com
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    Kenny Pflug
    Consultant @ Thinktecture AG
    4

    View full-size slide

  5. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    The agenda for today
    5
    Intro / Story
    Block I: 9:00 – 10:30
    Architecture / Technology / Code
    Block II: 11:00 – 12:30
    Architecture / Technology / Code
    Block III: 13:30 – 15:00
    Automation / Code / Recap
    Closing Q ‘n’ A
    Block IV: 15:30 – 17:00

    View full-size slide

  6. BLOCK I
    Introduction
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    6

    View full-size slide

  7. D E M O
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    7

    View full-size slide

  8. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    End-to-End Demo Application
    8

    View full-size slide

  9. Myth Busting & Definitions
    Aka “WTF?”
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    9

    View full-size slide

  10. Cloud-Native
    What is it NOT
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    10
    Myth Busting & Definitions

    View full-size slide

  11. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    11
    Myth Busting & Definitions

    View full-size slide

  12. Cloud-Native
    What is it
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    12
    Myth Busting & Definitions

    View full-size slide

  13. ”… is highly distributed, must operate in a
    constantly changing environment, and is
    itself constantly changing.”
    Cornelia Davis,
    Author of
    Cloud Native Patterns: Designing change-tolerant software
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    Cloud-Native Software
    13
    Myth Busting & Definitions

    View full-size slide

  14. Myth Busting & Definitions
    Cloud-Native Software
    Yes, it is all about Linux.
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    14

    View full-size slide

  15. Disadvantages of Windows Containers
    • Bigger in size
    • longer push/pull times
    • Require more storage (affects Kubernetes & PaaS)
    • Higher resource consumption
    • Windows Containers & Hosts need more CPU & memory
    • Direct impact on infrastructure budged
    • Host & container OS must have same version (strict policy)
    • https://kubernetes.io/docs/concepts/windows/intro/#windows-os-version-support
    • Meaning you may end up with way more infrastructure
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    Cloud-Native Software
    15
    Myth Busting & Definitions

    View full-size slide

  16. Myth Busting & Definitions
    Cloud-Native
    Candidate Applications
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    16

    View full-size slide

  17. § Strategic enterprise systems
    that need to constantly evolve
    business capabilities/features
    § Application that requires a
    high release velocity - with
    high confidence
    § System where individual
    features must release without
    a full redeployment of the
    entire system
    § Application developed by
    teams with expertise in
    different technology stacks
    § Application with components
    that must scale independently
    § ℹ Smaller, less impactful LOB
    applications might fare well
    with a simple monolithic
    architecture hosted in a Cloud
    PaaS environment
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    Candidates for Cloud-Native
    17
    Myth Busting & Definitions

    View full-size slide

  18. Cloud-Native
    & Microservices
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    18
    Myth Busting & Definitions

    View full-size slide

  19. Cloud-Native Attributes
    What & why
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    19

    View full-size slide

  20. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    20
    Availability
    Scalability
    Resiliency
    Configurability
    Observability
    Cloud-Native
    Applications
    Cloud-Native Attributes

    View full-size slide

  21. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    21
    Availability
    Scalability
    Resiliency
    Configurability
    Observability
    Cloud-Native
    Applications
    Cloud-Native Attributes

    View full-size slide

  22. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    22
    Availability
    Scalability
    Resiliency
    Configurability
    Observability
    Cloud-Native
    Applications
    Cloud-Native Attributes

    View full-size slide

  23. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    23
    Availability
    Scalability
    Resiliency
    Configurability
    Observability
    Cloud-Native
    Applications
    Cloud-Native Attributes

    View full-size slide

  24. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    24
    Availability
    Scalability
    Resiliency
    Configurability
    Observability
    Cloud-Native
    Applications
    Cloud-Native Attributes

    View full-size slide

  25. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    25
    Availability
    Scalability
    Resiliency
    Configurability
    Observability
    Cloud-Native
    Applications
    Cloud-Native Attributes

    View full-size slide

  26. Cloud-Native Landscape
    Complex affairs
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    26

    View full-size slide

  27. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    Our Brainstorming…
    27
    … there is a lot of
    infrastructure-
    related stuff !
    Cloud-Native Landscape

    View full-size slide

  28. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    28
    https://landscape.cncf.io/
    Cloud-Native Landscape

    View full-size slide

  29. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    29
    https://twitter.com/GeertBaeke/status/1577704842541285379
    Cloud-Native Landscape

    View full-size slide

  30. Cloud-Native & Cloud
    What’s in a name?
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    30

    View full-size slide

  31. "Cloud is about where we're computing.
    Cloud-Native is about how.”
    Cornelia Davis,
    Author of
    Cloud Native Patterns: Designing change-tolerant software
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    31
    Cloud-Native & Cloud

    View full-size slide

  32. From
    Build vs. Buy
    to
    Run vs. Rent
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    32
    Cloud-Native & Cloud

    View full-size slide

  33. Cloud Agnosticism
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    33
    Cloud-agnostic Cloud vendor-coupled
    More complex Complex
    Cloud-Native & Cloud

    View full-size slide

  34. Cloud Agnostism
    Going fully cloud-agnostic
    leads to
    re-implementing stuff that’s already there
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    34
    Cloud-Native & Cloud

    View full-size slide

  35. Hosting Options
    Running Cloud-Native applications
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    35

    View full-size slide

  36. § We can choose and mix from the continuum
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    Cloud Compute Continuum
    PaaS
    IaaS
    On-Premises Serverless
    36
    Managed
    Kubernetes
    Hosting options

    View full-size slide

  37. § Cloud-Native is not “just using” Kubernetes
    § Kubernetes is a powerful platform (orchestrator) to build
    and run cloud-native applications
    § Leverage Kubernetes patterns and capabilities to address
    certain cloud-native “ilities”
    § Kubernetes is a driver to become cloud-agnostic
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    Cloud-Native & Kubernetes
    37
    Hosting options

    View full-size slide

  38. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    Hosting Options - Comparison
    38
    Hosting options
    0 = worst / 3 = best

    View full-size slide

  39. BLOCK II
    Applying proven techniques
    to .NET applications
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    39

    View full-size slide

  40. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    40
    D E M
    Patterns

    View full-size slide

  41. Configurability by Example
    with IConfiguration
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    .NET by Example
    https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/ 42
    Techniques & Practices

    View full-size slide

  42. Observability by Example
    Individual Health Checks
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks 43
    Techniques & Practices

    View full-size slide

  43. Configuration by Example
    Integrate with the network environment
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer 44
    Techniques & Practices

    View full-size slide

  44. Redefined Responsibilities
    E.g.: Application devs
    do not configure HTTPS
    in the application
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    45
    Techniques & Practices

    View full-size slide

  45. Observability by Example
    Logging simplified
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/ 46
    Techniques & Practices

    View full-size slide

  46. Observability by Example
    Distributed Tracing with
    OpenTelemetry
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    https://opentelemetry.io/docs/instrumentation/net/getting-started/ 47
    Techniques & Practices

    View full-size slide

  47. Observability by Example
    Metrics with OpenTelemetry
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    48
    Techniques & Practices

    View full-size slide

  48. Containerization
    Create & use Docker Images
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    49
    Techniques & Practices

    View full-size slide

  49. BLOCK III
    Cloud-Native Patterns &
    Implementations
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    50

    View full-size slide

  50. § Execution independence /
    Hosting-agnostic
    § Different programming /
    tech stacks
    § Running anywhere
    § Resiliency
    § Location transparency
    § Error handling, retries
    § Decoupling
    § Robustness
    § Async business processes
    § Observability
    § Seeing everything
    end-to-end
    § Tracing, logging, metrics
    💡 Nice to have help here
    § Proven patterns
    § Support by libraries, SDK,
    runtime
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    Cloud-Native applications - Some tedious parts
    51
    Patterns & Implementations

    View full-size slide

  51. § Portable, event-driven runtime for building distributed applications
    § Open-source, community-driven, vendor-neutral
    § Prevents developers reinventing the wheel, esp. complex wheels
    § Making developers lives easier with
    consistent approach
    § Productivity tool, when having different
    § Generations of software types
    (greenfield and brownfield)
    § Languages & frameworks
    § Team formations
    ➡ Dapr as a common lingua franca
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    Dapr: Distributed Application Runtime - for Cloud-Native
    52
    Patterns & Implementations

    View full-size slide

  52. Cloud-Native-Workshop
    Dapr Building Blocks
    Moderne End-to-End-Architekturen in der Praxis
    53
    Patterns & Implementations

    View full-size slide

  53. Cloud-Native-Workshop
    Dapr Sidecar: Separating Concerns
    Moderne End-to-End-Architekturen in der Praxis
    daprd
    54
    Patterns & Implementations

    View full-size slide

  54. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    55
    Components: Abstracting Access to “Things”
    Patterns & Implementations

    View full-size slide

  55. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    56
    https://github.com/dapr/components-contrib/tree/master/pubsub
    Patterns & Implementations

    View full-size slide

  56. Cloud-Native-Workshop
    Service Invocation: Interception
    Moderne End-to-End-Architekturen in der Praxis
    57
    Patterns & Implementations

    View full-size slide

  57. Cloud-Native-Workshop
    On-Premises oder in der Cloud – mit Dapr
    58
    Publish & Subscribe: Decoupling
    Patterns & Implementations

    View full-size slide

  58. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    Input / Output Bindings & Triggers
    59
    Patterns & Implementations

    View full-size slide

  59. BLOCK IV
    Automation in Cloud-Native
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    60

    View full-size slide

  60. Automation in Cloud-Native
    The key to success!
    Automate EVERYTHING
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    61
    Automation

    View full-size slide

  61. “Everything that can be automated,
    should be automated.”
    Kevin Hoffman & Dan Nemeth,
    Author of
    Cloud Native Patterns: Designing change-tolerant software
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    62
    Automation

    View full-size slide

  62. “Anything you do more than once per day is a
    candidate for automation.”
    Kevin Hoffman & Dan Nemeth,
    Author of
    Cloud Native Patterns: Designing change-tolerant software
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    63
    Automation

    View full-size slide

  63. Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    Automation Layers
    Inner-Loop Infrastructure CI & CD
    Automation
    64

    View full-size slide

  64. Inner-Loop
    Automate everything you need to
    do while developing locally
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    65
    Automation

    View full-size slide

  65. Infrastructure
    Automate your cloud-infrastructure
    by applying Infrastructure-as-Code
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    66
    Automation

    View full-size slide

  66. Continuous Integration
    Build, Test, and Package every
    application component
    independently and automatically
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    67
    Automation

    View full-size slide

  67. Deployment
    Deploy every component
    independently and automatically
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    68
    Automation

    View full-size slide

  68. Deployment
    Embrace either
    Continuous Deployment or GitOps
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    69
    Automation

    View full-size slide

  69. Recap
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    71

    View full-size slide

  70. § Was Sie gesehen haben
    § Pragmatische Sicht auf Cloud-Native
    § Was? Warum? Wo? Wie?
    § Methodiken, Praktiken & Patterns
    § Verteilte Anwendungen mit Dapr
    § Automatisierung auf allen Ebenen
    § End-to-End Beispielanwendung
    § .NET-Code (und ein bisschen Go)
    § Lokal und in der Cloud
    § Terminal & CLIs
    § Was Sie nicht gesehen haben
    § Einführung in Docker,
    Kubernetes oder Azure
    § Deep Dives in Docker,
    Kubernetes oder Azure
    § Windows 🙈
    § Klick-Bunti in Visual Studio 😇
    § Businessaspekte, wie Business
    Domain Modeling oder SaaS
    § Cloud-Native Security
    Cloud-Native-Workshop
    Moderne End-to-End-Architekturen in der Praxis
    Summary
    72

    View full-size slide

  71. https://www.thinktecture.com/ueber-uns/karriere/
    Dankeschön!
    Kenny Pflug
    https://thinktecture.com/kenny-pflug
    Demos aus der Session:
    https://github.com/thinktecture-labs/
    cloud-native-sample
    https://www.thinktecture.com/wissen/
    Thorsten Hans
    https://thinktecture.com/thorsten-hans
    73

    View full-size slide