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

Help! I've created a serverless monolith - Azure Lowlands

Help! I've created a serverless monolith - Azure Lowlands

Slides for my session at Azure Lowlands.

Marc Duiker

June 30, 2022
Tweet

More Decks by Marc Duiker

Other Decks in Programming

Transcript

  1. @MarcDuiker
    Marc Duiker
    Sr Developer Advocate

    View full-size slide

  2. @MarcDuiker 3

    View full-size slide

  3. @MarcDuiker 4

    View full-size slide

  4. @MarcDuiker 5

    View full-size slide

  5. @MarcDuiker 6

    View full-size slide

  6. @MarcDuiker 7

    View full-size slide

  7. @MarcDuiker 8

    View full-size slide

  8. @MarcDuiker 9
    https://en.wikipedia.org/wiki/Monolithic_application
    “In software engineering, a monolithic
    application describes a software application
    that is designed without modularity.”

    View full-size slide

  9. @MarcDuiker 10
    https://en.wikipedia.org/wiki/Modularity
    “…modularity is the degree to which a
    system's components may be separated and
    recombined, often with the benefit of
    flexibility and variety in use.”

    View full-size slide

  10. @MarcDuiker
    App Server DB Server

    View full-size slide

  11. @MarcDuiker 13
    Function App
    Function App Queue Storage

    View full-size slide

  12. @MarcDuiker 14
    Function App
    Function App Queue Database

    View full-size slide

  13. @MarcDuiker 15

    View full-size slide

  14. @MarcDuiker 16

    View full-size slide

  15. @MarcDuiker 17

    View full-size slide

  16. @MarcDuiker 18

    View full-size slide

  17. @MarcDuiker 19
    https://martinfowler.com/articles/agileStory.html
    “We eventually agreed on "agile" as we felt
    that captured the adaptiveness and
    response to change which we felt was so
    important to our approach…”

    View full-size slide

  18. @MarcDuiker 20

    View full-size slide

  19. @MarcDuiker 21

    View full-size slide

  20. @MarcDuiker 22

    View full-size slide

  21. @MarcDuiker 23

    View full-size slide

  22. @MarcDuiker
    Task on backlog Work started Work completed

    View full-size slide

  23. @MarcDuiker 29
    https://www.atlassian.com/incident-management/kpis/common-metrics

    View full-size slide

  24. @MarcDuiker 30
    https://www.atlassian.com/incident-management/kpis/common-metrics

    View full-size slide

  25. @MarcDuiker https://www.atlassian.com/incident-management/kpis/common-metrics

    View full-size slide

  26. @MarcDuiker 32

    View full-size slide

  27. @MarcDuiker 33

    View full-size slide

  28. @MarcDuiker 35
    Caused by the nature of the
    (business) problem.
    Can’t be easily reduced.
    Caused by decisions we make related
    to architecture, frameworks,
    packages, code style etc.
    Can be reduced.
    https://en.wikipedia.org/wiki/Programming_complexity

    View full-size slide

  29. @MarcDuiker 36
    https://en.wikipedia.org/wiki/Programming_complexity
    Caused by decisions we make related
    to architecture, frameworks,
    packages, code style etc.
    Can be reduced.
    Caused by the nature of the
    (business) problem.
    Can’t be easily reduced.

    View full-size slide

  30. @MarcDuiker 37

    View full-size slide

  31. @MarcDuiker 38

    View full-size slide

  32. @MarcDuiker 40

    View full-size slide

  33. @MarcDuiker 41

    View full-size slide

  34. @MarcDuiker 42

    View full-size slide

  35. @MarcDuiker 45

    View full-size slide

  36. @MarcDuiker 46

    View full-size slide

  37. @MarcDuiker 47

    View full-size slide

  38. @MarcDuiker 48

    View full-size slide

  39. @MarcDuiker 49
    Domain
    Bounded
    Context Bounded
    Context
    Bounded
    Context
    Bounded
    Context
    https://thedomaindrivendesign.io/bounded-context/

    View full-size slide

  40. @MarcDuiker 50
    Ecommerce
    Product
    Catalog Inventory
    Billing
    Shopping
    Basket
    https://thedomaindrivendesign.io/bounded-context/

    View full-size slide

  41. @MarcDuiker
    “Ubiquitous language identifies the terms
    and concepts within a bounded context that
    are unambiguous and agreed upon by all
    stakeholders.”
    https://thedomaindrivendesign.io/what-is-strategic-design

    View full-size slide

  42. @MarcDuiker 52
    Banking Context Ecommerce Context
    https://thedomaindrivendesign.io/what-is-strategic-design

    View full-size slide

  43. @MarcDuiker 53

    View full-size slide

  44. @MarcDuiker 54

    View full-size slide

  45. @MarcDuiker
    “Resilience is the ability to provide and
    maintain an acceptable level of service in
    the face of faults and challenges to normal
    operation.”
    https://en.wikipedia.org/wiki/Resilience_(network)

    View full-size slide

  46. @MarcDuiker https://docs.microsoft.com/en-us/azure/architecture/patterns/

    View full-size slide

  47. @MarcDuiker 60

    View full-size slide

  48. @MarcDuiker 61

    View full-size slide

  49. @MarcDuiker 62
    Function App B
    Function App A Queue Storage

    View full-size slide

  50. @MarcDuiker 63

    View full-size slide

  51. @MarcDuiker 64
    Increase number of (virtual) machines Increase CPU / memory of one machine

    View full-size slide

  52. @MarcDuiker 66

    View full-size slide

  53. @MarcDuiker 68
    Fan out Fan out
    No fan out No fan out

    View full-size slide

  54. @MarcDuiker 69
    Fan out
    Fan out
    No fan out No fan out
    https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale#scale
    Use dedicated
    resource to its
    fullest

    View full-size slide

  55. @MarcDuiker 70
    Fan out Fan out
    No fan out No fan out
    https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale#scale
    Use higher tier / sku
    Use regular tier / sku

    View full-size slide

  56. @MarcDuiker 74
    Ask yourself these questions before adding any code:
    - Do *I* need to write this?
    - Is this a good fit with the rest of the app?
    - What is the impact regarding resilience/scalability of
    the app?

    View full-size slide

  57. @MarcDuiker 75
    https://quest.ably.dev/

    View full-size slide

  58. @MarcDuiker 76
    Twitter:
    @marcduiker
    YouTube:
    http://bit.ly/marc-serverless
    Ably Discord:
    https://discord.gg/q89gDHZcBK

    View full-size slide