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

    View Slide

  2. @MarcDuiker
    Marc Duiker
    Sr Developer Advocate

    View Slide

  3. @MarcDuiker 3

    View Slide

  4. @MarcDuiker 4

    View Slide

  5. @MarcDuiker 5

    View Slide

  6. @MarcDuiker 6

    View Slide

  7. @MarcDuiker 7

    View Slide

  8. @MarcDuiker 8

    View Slide

  9. @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 Slide

  10. @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 Slide

  11. @MarcDuiker
    App Server DB Server

    View Slide

  12. @MarcDuiker 13
    Function App
    Function App Queue Storage

    View Slide

  13. @MarcDuiker 14
    Function App
    Function App Queue Database

    View Slide

  14. @MarcDuiker 15

    View Slide

  15. @MarcDuiker 16

    View Slide

  16. @MarcDuiker 17

    View Slide

  17. @MarcDuiker 18

    View Slide

  18. @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 Slide

  19. @MarcDuiker 20

    View Slide

  20. @MarcDuiker 21

    View Slide

  21. @MarcDuiker 22

    View Slide

  22. @MarcDuiker 23

    View Slide

  23. @MarcDuiker

    View Slide

  24. @MarcDuiker

    View Slide

  25. @MarcDuiker
    Task on backlog Work started Work completed

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  29. @MarcDuiker 32

    View Slide

  30. @MarcDuiker 33

    View Slide

  31. @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 Slide

  32. @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 Slide

  33. @MarcDuiker 37

    View Slide

  34. @MarcDuiker 38

    View Slide

  35. @MarcDuiker 40

    View Slide

  36. @MarcDuiker 41

    View Slide

  37. @MarcDuiker 42

    View Slide

  38. @MarcDuiker 45

    View Slide

  39. @MarcDuiker 46

    View Slide

  40. @MarcDuiker 47

    View Slide

  41. @MarcDuiker 48

    View Slide

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

    View Slide

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

    View Slide

  44. @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 Slide

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

    View Slide

  46. @MarcDuiker 53

    View Slide

  47. @MarcDuiker 54

    View Slide

  48. @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 Slide

  49. @MarcDuiker

    View Slide

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

    View Slide

  51. @MarcDuiker 60

    View Slide

  52. @MarcDuiker 61

    View Slide

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

    View Slide

  54. @MarcDuiker 63

    View Slide

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

    View Slide

  56. @MarcDuiker 66

    View Slide

  57. @MarcDuiker

    View Slide

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

    View Slide

  59. @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 Slide

  60. @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 Slide

  61. @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 Slide

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

    View Slide

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

    View Slide