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

Help I've created a serverless monolith - Microsoft Reactor Toronto

Marc Duiker
January 20, 2022

Help I've created a serverless monolith - Microsoft Reactor Toronto

Marc Duiker

January 20, 2022
Tweet

More Decks by Marc Duiker

Other Decks in Technology

Transcript

  1. @MarcDuiker 2
    Marc Duiker
    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 12
    Function App
    Function App Queue Database

    View full-size slide

  12. @MarcDuiker 13
    Function App
    Function App Queue Database

    View full-size slide

  13. @MarcDuiker 14
    Function App
    Function App Queue Database

    View full-size slide

  14. @MarcDuiker 15

    View full-size slide

  15. @MarcDuiker 16

    View full-size slide

  16. @MarcDuiker 17

    View full-size slide

  17. @MarcDuiker 18

    View full-size 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 full-size slide

  19. @MarcDuiker 20

    View full-size slide

  20. @MarcDuiker 21

    View full-size slide

  21. @MarcDuiker 22

    View full-size slide

  22. @MarcDuiker
    Task on backlog Work completed

    View full-size slide

  23. @MarcDuiker
    Task on backlog Work started Work completed

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  27. @MarcDuiker 31

    View full-size slide

  28. @MarcDuiker 32

    View full-size slide

  29. @MarcDuiker 33
    Caused by the nature of the
    (business) problem.
    Can’t be easily reduced.
    https://en.wikipedia.org/wiki/Programming_complexity

    View full-size slide

  30. @MarcDuiker 34
    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

  31. @MarcDuiker 35
    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

  32. @MarcDuiker 36

    View full-size slide

  33. @MarcDuiker 37

    View full-size slide

  34. @MarcDuiker 38

    View full-size slide

  35. @MarcDuiker 39

    View full-size slide

  36. @MarcDuiker 40

    View full-size slide

  37. @MarcDuiker 41

    View full-size slide

  38. @MarcDuiker 42

    View full-size slide

  39. @MarcDuiker 43

    View full-size slide

  40. @MarcDuiker 44

    View full-size slide

  41. @MarcDuiker 45

    View full-size slide

  42. @MarcDuiker 46

    View full-size slide

  43. @MarcDuiker 47

    View full-size slide

  44. @MarcDuiker 48
    Domain
    Bounded
    Context Bounded
    Context
    Bounded
    Context
    Bounded
    Context
    https://thedomaindrivendesign.io/bounded-context/

    View full-size slide

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

    View full-size slide

  46. @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

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

    View full-size slide

  48. @MarcDuiker 52

    View full-size slide

  49. @MarcDuiker 53

    View full-size slide

  50. @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

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  54. @MarcDuiker 59

    View full-size slide

  55. @MarcDuiker 60

    View full-size slide

  56. @MarcDuiker 61
    Function App
    Function App Queue Database

    View full-size slide

  57. @MarcDuiker 62

    View full-size slide

  58. @MarcDuiker 63
    Increase number of (virtual) machines Increase CPU / memory of one machine

    View full-size slide

  59. @MarcDuiker 64

    View full-size slide

  60. @MarcDuiker 65

    View full-size slide

  61. @MarcDuiker 67
    Fan out Fan out
    No fan out No fan out

    View full-size slide

  62. @MarcDuiker 68
    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

  63. @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 higher tier / sku
    Use regular tier / sku

    View full-size slide

  64. @MarcDuiker 70
    Ask yourself these questions before adding any code:

    View full-size slide

  65. @MarcDuiker 71
    Ask yourself these questions before adding any code:
    - Do *I* need to write this?

    View full-size slide

  66. @MarcDuiker 72
    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?

    View full-size slide

  67. @MarcDuiker 73
    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

  68. @MarcDuiker 74
    @marcduiker
    http://bit.ly/marc-serverless

    View full-size slide