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

Building a Cloud Native Bank

mattheath
October 26, 2018

Building a Cloud Native Bank

Presented at McKinsey's DevOpsDays 2018

mattheath

October 26, 2018
Tweet

More Decks by mattheath

Other Decks in Programming

Transcript

  1. Building a
    Cloud-Native Bank
    Matt Heath, Monzo

    View Slide


  2. View Slide

  3. Hi, I’m Matt

    View Slide

  4. @mattheath

    View Slide

  5. View Slide

  6. View Slide

  7. Nov
    2015
    Oct
    2018
    CUSTOMER

    GROWTH

    View Slide


  8. 1,100,102

    View Slide

  9. View Slide

  10. View Slide

  11. View Slide

  12. View Slide

  13. View Slide

  14. View Slide

  15. View Slide

  16. View Slide

  17. View Slide

  18. View Slide

  19. View Slide

  20. LICENCE WITH
    RESTRICTIONS
    WE ARE
    HERE
    A UK banking licence is authorised by the PRA and
    regulated by the PRA and FCA1, allowing deposit-
    taking and balance sheet lending. Once granted,
    it allows firms to passport across Europe, accessing
    This is followed by a “mobilisation” phase during
    which final capital is raised and IT systems are
    completed, before launching to the public.
    We received a UK banking licence in August 2016!
    FEB
    2015
    JAN
    2016
    JAN
    2017
    MAR FEB FEB
    APR MAR MAR APR MAY JUN JUL
    MAY APR
    JUN MAY
    JUL JUN
    AUG JUL
    SEP AUG
    NOV SEP
    DEC NOV DEC
    PRE APPLICATION APPLICATION MOBILISATION LAUNCH
    LICENCE WITH
    RESTRICTIONS
    50K MAX
    DEPOSIT
    WE ARE
    HERE
    A UK banking licence is authorised by the PRA and
    regulated by the PRA and FCA1, allowing deposit-
    taking and balance sheet lending. Once granted,
    it allows firms to passport across Europe, accessing
    This is followed by a “mobilisation” phase during
    which final capital is raised and IT systems are
    completed, before launching to the public.
    We received a UK banking licence in August 2016!
    JAN
    2016
    JAN
    2017
    MAR FEB FEB
    APR MAR MAR APR MAY JUN JUL
    MAY APR
    JUN MAY
    JUL JUN
    AUG JUL
    SEP AUG
    NOV SEP
    DEC NOV DEC
    E APPLICATION APPLICATION MOBILISATION LAUNCH
    LICENCE WITH
    RESTRICTIONS
    WE ARE
    HERE
    AUG

    2016
    JAN

    2016
    Feb

    2015
    APR

    2017
    A UK banking licence is authorised by the PRA and
    regulated by the PRA and FCA1, allowing deposit-
    taking and balance sheet lending. Once granted,
    it allows firms to passport across Europe, accessing
    This is followed by a “mobilisation” phase during
    which final capital is raised and IT systems are
    completed, before launching to the public.
    We received a UK banking licence in August 2016!
    FEB
    2015
    JAN
    2016
    JAN
    2017
    MAR FEB FEB
    APR MAR MAR APR
    MAY APR
    JUN MAY
    JUL JUN
    AUG JUL
    SEP AUG
    NOV SEP
    DEC NOV DEC
    PRE APPLICATION APPLICATION MOBILISATION
    LICENCE WITH
    RESTRICTIONS
    WE ARE
    HERE

    View Slide

  21. Henrik Kniberg

    View Slide

  22. Henrik Kniberg

    View Slide

  23. View Slide

  24. View Slide

  25. View Slide

  26. ?

    View Slide


  27. View Slide


  28. View Slide


  29. View Slide

  30. EXTENSIBLE
    SCALABLE
    RELIABLE
    SECURE

    CHEAP
    FAST

    View Slide

  31. ?

    View Slide

  32. Application

    View Slide

  33. Application

    View Slide

  34. APPLICATION
    Application

    View Slide

  35. View Slide

  36. View Slide

  37. LICENCE WITH
    RESTRICTIONS
    WE ARE
    HERE
    A UK banking licence is authorised by the PRA and
    regulated by the PRA and FCA1, allowing deposit-
    taking and balance sheet lending. Once granted,
    it allows firms to passport across Europe, accessing
    This is followed by a “mobilisation” phase during
    which final capital is raised and IT systems are
    completed, before launching to the public.
    We received a UK banking licence in August 2016!
    FEB
    2015
    JAN
    2016
    JAN
    2017
    MAR FEB FEB
    APR MAR MAR APR MAY JUN JUL
    MAY APR
    JUN MAY
    JUL JUN
    AUG JUL
    SEP AUG
    NOV SEP
    DEC NOV DEC
    PRE APPLICATION APPLICATION MOBILISATION LAUNCH
    LICENCE WITH
    RESTRICTIONS
    50K MAX
    DEPOSIT
    WE ARE
    HERE
    A UK banking licence is authorised by the PRA and
    regulated by the PRA and FCA1, allowing deposit-
    taking and balance sheet lending. Once granted,
    it allows firms to passport across Europe, accessing
    This is followed by a “mobilisation” phase during
    which final capital is raised and IT systems are
    completed, before launching to the public.
    We received a UK banking licence in August 2016!
    JAN
    2016
    JAN
    2017
    MAR FEB FEB
    APR MAR MAR APR MAY JUN JUL
    MAY APR
    JUN MAY
    JUL JUN
    AUG JUL
    SEP AUG
    NOV SEP
    DEC NOV DEC
    E APPLICATION APPLICATION MOBILISATION LAUNCH
    LICENCE WITH
    RESTRICTIONS
    WE ARE
    HERE
    JAN

    2016
    Feb

    2015
    APR

    2017
    A UK banking licence is authorised by the PRA and
    regulated by the PRA and FCA1, allowing deposit-
    taking and balance sheet lending. Once granted,
    it allows firms to passport across Europe, accessing
    This is followed by a “mobilisation” phase during
    which final capital is raised and IT systems are
    completed, before launching to the public.
    We received a UK banking licence in August 2016!
    FEB
    2015
    JAN
    2016
    JAN
    2017
    MAR FEB FEB
    APR MAR MAR APR
    MAY APR
    JUN MAY
    JUL JUN
    AUG JUL
    SEP AUG
    NOV SEP
    DEC NOV DEC
    PRE APPLICATION APPLICATION MOBILISATION
    LICENCE WITH
    RESTRICTIONS
    WE ARE
    HERE
    AUG

    2016

    View Slide

  38. LICENCE WITH
    RESTRICTIONS
    WE ARE
    HERE
    A UK banking licence is authorised by the PRA and
    regulated by the PRA and FCA1, allowing deposit-
    taking and balance sheet lending. Once granted,
    it allows firms to passport across Europe, accessing
    This is followed by a “mobilisation” phase during
    which final capital is raised and IT systems are
    completed, before launching to the public.
    We received a UK banking licence in August 2016!
    FEB
    2015
    JAN
    2016
    JAN
    2017
    MAR FEB FEB
    APR MAR MAR APR MAY JUN JUL
    MAY APR
    JUN MAY
    JUL JUN
    AUG JUL
    SEP AUG
    NOV SEP
    DEC NOV DEC
    PRE APPLICATION APPLICATION MOBILISATION LAUNCH
    LICENCE WITH
    RESTRICTIONS
    50K MAX
    DEPOSIT
    WE ARE
    HERE
    A UK banking licence is authorised by the PRA and
    regulated by the PRA and FCA1, allowing deposit-
    taking and balance sheet lending. Once granted,
    it allows firms to passport across Europe, accessing
    This is followed by a “mobilisation” phase during
    which final capital is raised and IT systems are
    completed, before launching to the public.
    We received a UK banking licence in August 2016!
    JAN
    2016
    JAN
    2017
    MAR FEB FEB
    APR MAR MAR APR MAY JUN JUL
    MAY APR
    JUN MAY
    JUL JUN
    AUG JUL
    SEP AUG
    NOV SEP
    DEC NOV DEC
    E APPLICATION APPLICATION MOBILISATION LAUNCH
    LICENCE WITH
    RESTRICTIONS
    WE ARE
    HERE
    JAN

    2016
    Feb

    2015
    APR

    2017
    A UK banking licence is authorised by the PRA and
    regulated by the PRA and FCA1, allowing deposit-
    taking and balance sheet lending. Once granted,
    it allows firms to passport across Europe, accessing
    This is followed by a “mobilisation” phase during
    which final capital is raised and IT systems are
    completed, before launching to the public.
    We received a UK banking licence in August 2016!
    FEB
    2015
    JAN
    2016
    JAN
    2017
    MAR FEB FEB
    APR MAR MAR APR
    MAY APR
    JUN MAY
    JUL JUN
    AUG JUL
    SEP AUG
    NOV SEP
    DEC NOV DEC
    PRE APPLICATION APPLICATION MOBILISATION
    LICENCE WITH
    RESTRICTIONS
    WE ARE
    HERE
    AUG

    2016
    INTERNAL
    TEST
    CARDS

    View Slide

  39. View Slide

  40. A UK banking licence is authorised by the PRA and
    regulated by the PRA and FCA1, allowing deposit-
    taking and balance sheet lending. Once granted,
    it allows firms to passport across Europe, accessing
    This is followed by a “mobilisation” phase during
    which final capital is raised and IT systems are
    completed, before launching to the public.
    We received a UK banking licence in August 2016!
    FEB
    2015
    JAN
    2016
    JAN
    2017
    MAR FEB FEB
    APR MAR MAR APR MAY JUN JUL
    MAY APR
    JUN MAY
    JUL JUN
    AUG JUL
    SEP AUG
    NOV SEP
    DEC NOV DEC
    PRE APPLICATION APPLICATION MOBILISATION LAUNCH
    LICENCE WITH
    RESTRICTIONS
    50K MAX
    DEPOSIT
    WE ARE
    HERE
    A UK banking licence is authorised by the PRA and
    regulated by the PRA and FCA1, allowing deposit-
    taking and balance sheet lending. Once granted,
    it allows firms to passport across Europe, accessing
    This is followed by a “mobilisation” phase during
    which final capital is raised and IT systems are
    completed, before launching to the public.
    We received a UK banking licence in August 2016!
    JAN
    2016
    JAN
    2017
    MAR FEB FEB
    APR MAR MAR APR MAY JUN JUL
    MAY APR
    JUN MAY
    JUL JUN
    AUG JUL
    SEP AUG
    NOV SEP
    DEC NOV DEC
    E APPLICATION APPLICATION MOBILISATION LAUNCH
    LICENCE WITH
    RESTRICTIONS
    WE ARE
    HERE
    JAN

    2016
    Feb

    2015
    APR

    2017
    PREPAID

    CARD

    LAUNCH
    LICENCE WITH
    RESTRICTIONS
    WE ARE
    HERE
    A UK banking licence is authorised by the PRA and
    regulated by the PRA and FCA1, allowing deposit-
    taking and balance sheet lending. Once granted,
    it allows firms to passport across Europe, accessing
    This is followed by a “mobilisation” phase during
    which final capital is raised and IT systems are
    completed, before launching to the public.
    We received a UK banking licence in August 2016!
    FEB
    2015
    JAN
    2016
    JAN
    2017
    MAR FEB FEB
    APR MAR MAR APR
    MAY APR
    JUN MAY
    JUL JUN
    AUG JUL
    SEP AUG
    NOV SEP
    DEC NOV DEC
    PRE APPLICATION APPLICATION MOBILISATION
    LICENCE WITH
    RESTRICTIONS
    WE ARE
    HERE
    AUG

    2016
    INTERNAL
    TEST
    CARDS

    View Slide

  41. View Slide

  42. View Slide

  43. View Slide

  44. A UK banking licence is authorised by the PRA and
    regulated by the PRA and FCA1, allowing deposit-
    taking and balance sheet lending. Once granted,
    it allows firms to passport across Europe, accessing
    This is followed by a “mobilisation” phase during
    which final capital is raised and IT systems are
    completed, before launching to the public.
    We received a UK banking licence in August 2016!
    FEB
    2015
    JAN
    2016
    JAN
    2017
    MAR FEB FEB
    APR MAR MAR APR MAY JUN JUL
    MAY APR
    JUN MAY
    JUL JUN
    AUG JUL
    SEP AUG
    NOV SEP
    DEC NOV DEC
    PRE APPLICATION APPLICATION MOBILISATION LAUNCH
    LICENCE WITH
    RESTRICTIONS
    50K MAX
    DEPOSIT
    WE ARE
    HERE
    A UK banking licence is authorised by the PRA and
    regulated by the PRA and FCA1, allowing deposit-
    taking and balance sheet lending. Once granted,
    it allows firms to passport across Europe, accessing
    This is followed by a “mobilisation” phase during
    which final capital is raised and IT systems are
    completed, before launching to the public.
    We received a UK banking licence in August 2016!
    JAN
    2016
    JAN
    2017
    MAR FEB FEB
    APR MAR MAR APR MAY JUN JUL
    MAY APR
    JUN MAY
    JUL JUN
    AUG JUL
    SEP AUG
    NOV SEP
    DEC NOV DEC
    E APPLICATION APPLICATION MOBILISATION LAUNCH
    LICENCE WITH
    RESTRICTIONS
    WE ARE
    HERE
    JAN

    2016
    Feb

    2015
    APR

    2017
    PREPAID

    CARD

    LAUNCH
    LICENCE WITH
    RESTRICTIONS
    WE ARE
    HERE
    A UK banking licence is authorised by the PRA and
    regulated by the PRA and FCA1, allowing deposit-
    taking and balance sheet lending. Once granted,
    it allows firms to passport across Europe, accessing
    This is followed by a “mobilisation” phase during
    which final capital is raised and IT systems are
    completed, before launching to the public.
    We received a UK banking licence in August 2016!
    FEB
    2015
    JAN
    2016
    JAN
    2017
    MAR FEB FEB
    APR MAR MAR APR
    MAY APR
    JUN MAY
    JUL JUN
    AUG JUL
    SEP AUG
    NOV SEP
    DEC NOV DEC
    PRE APPLICATION APPLICATION MOBILISATION
    LICENCE WITH
    RESTRICTIONS
    WE ARE
    HERE
    AUG

    2016
    INTERNAL
    TEST
    CARDS

    View Slide


  45. View Slide

  46. Server

    View Slide



  47. instance

    View Slide

  48. instance instance

    View Slide

  49. instance instance instance instance instance instance

    View Slide

  50. instance instance instance instance instance instance
    {
    {
    {
    eu-west-1a eu-west-1b eu-west-1c

    View Slide

  51. instance instance instance instance instance instance
    Kubernetes

    View Slide

  52. instance instance instance instance instance
    kubelet
    Kubernetes

    View Slide

  53. kubelet kubelet kubelet kubelet kubelet kubelet
    Kubernetes

    View Slide

  54. kubernetes

    View Slide

  55. kubernetes
    pod pod pod pod pod pod
    pod
    pod
    pod pod

    View Slide

  56. kubernetes
    service service service service service service
    service
    service
    service service

    View Slide

  57. kubernetes
    service service service service service service
    service
    service
    service service

    View Slide

  58. kubernetes
    service service service service service service
    service
    service
    service service

    View Slide

  59. kubernetes
    service service service service service service
    service
    service
    service service

    View Slide

  60. kubernetes
    service service service service service service
    service
    service
    service service service
    service
    service

    View Slide

  61. kubernetes
    service service service service service
    service service service
    service
    service

    View Slide

  62. kubernetes
    service Prometheus service service Kafka linkerd
    Kafka
    service
    service Elasticsearch calico
    API
    service

    View Slide

  63. View Slide

  64. AWS Public Cloud

    View Slide

  65. AWS Public Cloud
    Kubernetes

    View Slide

  66. AWS Public Cloud
    Cassandra
    etc
    Kubernetes

    View Slide

  67. AWS Public Cloud
    Kafka etcd
    Cassandra
    etc
    Elasticsearch
    Kubernetes
    Prometheus
    NSQ

    View Slide

  68. Monzo Platform

    View Slide

  69. Monzo Platform

    View Slide

  70. Monzo Services
    Monzo Platform

    View Slide

  71. View Slide

  72. Feb
    2015
    Oct
    2018
    800

    View Slide

  73. View Slide

  74. API Gateway

    View Slide

  75. API

    View Slide

  76. API Gateway
    API
    Service
    API
    Service
    API
    Service
    API
    Service
    API
    Service
    API
    Service
    API
    Service
    API
    Service

    View Slide

  77. View Slide

  78. API Gateway
    Accounts Cards Pots Feed Payments …

    View Slide

  79. API Gateway
    Accounts Cards Pots Feed Payments …
    New

    Exciting

    API!!

    View Slide

  80. Cards Pots Payments …
    API Gateway
    Accounts
    New

    Exciting

    API!!





    Feed

    View Slide

  81. Cards Pots Payments …
    API Gateway
    Accounts
    New

    Exciting

    API!!






    Feed

    View Slide

  82. API Gateway
    Accounts Cards Pots Payments …
    New

    Exciting

    API!!


    Feed

    View Slide

  83. Event Driven

    Architecture

    View Slide

  84. Service
    A
    Service
    B
    Load Balancer
    Edge Gateway
    API
    Service

    View Slide

  85. API
    Service
    Service
    A
    Service
    B
    Load Balancer
    Edge Gateway

    View Slide

  86. API
    Service
    Service
    A
    Service
    B
    Load Balancer
    Edge Gateway
    Service
    D
    Service
    E

    View Slide

  87. API
    Service
    Service
    A
    Service
    B
    Load Balancer
    Edge Gateway
    Service
    C
    Service
    D
    Service
    E

    View Slide

  88. API
    Service
    Service
    A
    Service
    B
    Load Balancer
    Edge Gateway
    Service
    C
    Service
    D
    Service
    E

    View Slide

  89. Reliable Communication

    View Slide

  90. Service
    Service Service
    Service

    View Slide

  91. Service
    Service Service
    Service
    ?

    View Slide

  92. Service
    Service Service
    Service
    linkerd

    View Slide

  93. Service
    linkerd

    View Slide

  94. Service
    Service Service
    Service
    linkerd

    View Slide

  95. Service
    Service Service
    Service
    linkerd

    View Slide

  96. Service
    Service Service
    Service
    linkerd

    View Slide

  97. Monzo Services
    Monzo Platform

    View Slide

  98. Team & Company

    Structure

    View Slide

  99. Monzo Services
    Monzo Platform

    View Slide

  100. Monzo Services
    Monzo Platform

    View Slide

  101. View Slide

  102. View Slide

  103. View Slide

  104. View Slide

  105. View Slide

  106. View Slide

  107. Enforcing Resilience

    View Slide

  108. Production load tests & Shadow Traffic

    View Slide

  109. View Slide

  110. Ship it and iterate.
    Make changes small, make them often.
    Technical debt is a useful tool.
    Solve problems at the root.
    Do not accept deviant system behaviour.
    Write code to be read.
    Write code to be debugged.
    If you can’t show it’s a bottleneck, don’t optimise it.
    Unblock others whenever you can.
    Leave the codebase better than you found it.

    View Slide

  111. Ship it and iterate.
    Make changes small, make them often.
    Technical debt is a useful tool.
    Solve problems at the root.
    Do not accept deviant system behaviour.
    Write code to be read.
    Write code to be debugged.
    If you can’t show it’s a bottleneck, don’t optimise it.
    Unblock others whenever you can.
    Leave the codebase better than you found it.

    View Slide


  112. View Slide


  113. View Slide

  114. EXTENSIBLE
    SCALABLE
    RELIABLE
    SECURE

    CHEAP
    FAST

    View Slide

  115. Simple / small components
    No single points of failure
    Minimise critical path
    Masterless systems
    Queue deferrable tasks
    Automate failure correction

    View Slide

  116. Cross-functional teams
    Own their systems
    Empowered to move fast

    View Slide