Slide 1

Slide 1 text

Breaking down problems Building systems of systems with microservices at Monzo 
 @mattheath

Slide 2

Slide 2 text

Hi, I’m Matt

Slide 3

Slide 3 text

@mattheath

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

16:02 Wednesday 29 May

Slide 7

Slide 7 text

Nov 2015 May 2019 Fastest growing UK Bank
 2m customers 40k a week

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

Henrik Kniberg

Slide 14

Slide 14 text

Henrik Kniberg

Slide 15

Slide 15 text

James Leah Matt

Slide 16

Slide 16 text

James Leah Matt

Slide 17

Slide 17 text

James Leah Matt

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

X X X

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

☕☕

Slide 27

Slide 27 text

☕☕

Slide 28

Slide 28 text

Payment API Ledger

Slide 29

Slide 29 text

Payment API Ledger Database

Slide 30

Slide 30 text

Transactions Payment API Ledger

Slide 31

Slide 31 text

Transactions Payment API Ledger Accounts

Slide 32

Slide 32 text

Payment API Transactions Ledger Accounts Cassandra Database

Slide 33

Slide 33 text

Payment API Transactions Ledger Accounts Cassandra Database ? ? ? ? ? ? ? ? ?

Slide 34

Slide 34 text

Henrik Kniberg

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

Payment API Transactions Ledger Accounts Cassandra Database

Slide 41

Slide 41 text

Card API Payment API Transactions Ledger Accounts Cassandra Database

Slide 42

Slide 42 text

IT’S REAL!

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

Feb 2015 May 2019 monzo services

Slide 51

Slide 51 text

1136 Feb 2015 May 2019 monzo services

Slide 52

Slide 52 text

Why do we break down problems?

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

Why do we break down problems? Manage risk , Scale organisations Use the best tools for the job

Slide 57

Slide 57 text

Why do we break down problems? Manage risk , Scale organisations Use the best tools for the job

Slide 58

Slide 58 text

Managing risk ⚠ Are we building the right thing? ⚠ Will we hit deadlines?

Slide 59

Slide 59 text

Henrik Kniberg

Slide 60

Slide 60 text

Guiding Principle: 
 Ship it, and iterate.

Slide 61

Slide 61 text

Guiding Principle: 
 Make changes small, make them often

Slide 62

Slide 62 text

Why do we break down problems? Manage risk Use the best tools for the job , Scale organisations

Slide 63

Slide 63 text

Why do we break down problems? Manage risk Use the best tools for the job , Scale organisations

Slide 64

Slide 64 text

How do we break down problems?

Slide 65

Slide 65 text

Dividing features up

Slide 66

Slide 66 text

Henrik Kniberg

Slide 67

Slide 67 text

Split by domain

Slide 68

Slide 68 text

Split by domain users transactions faster payments card payments cards accounts addresses profiles feature flags points pots direct debits

Slide 69

Slide 69 text

Split by responsibility

Slide 70

Slide 70 text

Split by responsibility card management customer
 signup clearing
 processing reconciliation pots accounts authentication authorisation bank
 statements message signing

Slide 71

Slide 71 text

Guiding Principle: 
 Do one thing, do it well.

Slide 72

Slide 72 text

Examples:
 Building APIs

Slide 73

Slide 73 text

No content

Slide 74

Slide 74 text

No content

Slide 75

Slide 75 text

API

Slide 76

Slide 76 text

API

Slide 77

Slide 77 text

API Service API Service API Service API Service API Service API Service API Service API Service Edge Gateway

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

Accounts Cards Pots Feed Payments … Edge Gateway

Slide 80

Slide 80 text

Edge Gateway Accounts Cards Pots Payments … New
 Exciting
 API!! Feed

Slide 81

Slide 81 text

Cards Pots Payments … Accounts New
 Exciting
 API!! Feed Edge Gateway

Slide 82

Slide 82 text

Cards Pots Payments … Accounts New
 Exciting
 API!! Feed Edge Gateway

Slide 83

Slide 83 text

Edge Gateway Accounts Cards Pots Payments … New
 Exciting
 API!! Feed

Slide 84

Slide 84 text

Isolate failure Make changes small, make them often Ship it, and iterate , Scale teams and organisations

Slide 85

Slide 85 text

Single responsibility

Slide 86

Slide 86 text

Load Balancer Edge Gateway

Slide 87

Slide 87 text

Load Balancer Edge Gateway API Service

Slide 88

Slide 88 text

Service A Load Balancer Edge Gateway API Service

Slide 89

Slide 89 text

Service A Service B Load Balancer Edge Gateway API Service

Slide 90

Slide 90 text

Service A Service B Load Balancer Edge Gateway API Service Responsible for external interface Responsible for domain logic Responsible for routing

Slide 91

Slide 91 text

Manage complexity

Slide 92

Slide 92 text

Account
 Service Load Balancer Edge Gateway Account
 API

Slide 93

Slide 93 text

Account
 Service Load Balancer Edge Gateway Account
 API Account
 Number
 Service

Slide 94

Slide 94 text

Account
 Service Load Balancer Edge Gateway Account
 API Account
 Number
 Service IBAN
 Service

Slide 95

Slide 95 text

Account
 Service Load Balancer Edge Gateway Account
 API Account
 Number
 Service IBAN
 Service Account service responsibility remains unchanged, even as overall system complexity increases

Slide 96

Slide 96 text

Account
 Service Load Balancer Edge Gateway Account
 API Account
 Number
 Service IBAN
 Service Additional, simple, services solve related but separate problems

Slide 97

Slide 97 text

Account
 Service Load Balancer Edge Gateway Account
 API Account
 Number
 Service IBAN
 Service

Slide 98

Slide 98 text

Account
 Service Load Balancer Edge Gateway Account
 API Account
 Number
 Service IBAN
 Service Euro
 Payment
 Services 5

Slide 99

Slide 99 text

Account
 Service Account
 Number
 Service IBAN
 Service Euro
 Payment
 Services 5 Decoupling more specialised behaviour keeps services simple 6

Slide 100

Slide 100 text

Account
 Service Account
 Number
 Service IBAN
 Service Euro
 Payment
 Services 5 Faster
 Payment
 Services 6

Slide 101

Slide 101 text

Account
 Service Account
 Number
 Service IBAN
 Service Euro
 Payment
 Services 5 Faster
 Payment
 Services 6

Slide 102

Slide 102 text

Account
 Service Account
 Number
 Service IBAN
 Service Euro
 Payment
 Services 5 Faster
 Payment
 Services 6 Isolating failure along domain boundaries improves availability

Slide 103

Slide 103 text

Managing Complexity

Slide 104

Slide 104 text

Guiding Principle: 
 Simplicity

Slide 105

Slide 105 text

https://xkcd.com/927/

Slide 106

Slide 106 text

Feb 2015 May 2019 monzo services

Slide 107

Slide 107 text

Feb 2015 May 2019 monzo services The Refactathon https://monzo.com/blog/2018/12/04/refactoring-old-code/

Slide 108

Slide 108 text

8 Identify areas of complexity and debt ⏱ Make time to improve these Teams move faster as a result

Slide 109

Slide 109 text

Guiding Principle: 
 Standardisation

Slide 110

Slide 110 text

Build on abstractions

Slide 111

Slide 111 text

instance instance instance instance instance instance

Slide 112

Slide 112 text

instance instance instance instance instance instance Kubernetes

Slide 113

Slide 113 text

kubernetes

Slide 114

Slide 114 text

kubernetes service service service service service service service service service service service service service

Slide 115

Slide 115 text

kubernetes service Prometheus service service Kafka envoy Kafka service service Elasticsearch calico API service

Slide 116

Slide 116 text

Service Service Reliable inter-service
 communication offloaded to Envoy, simplifying services

Slide 117

Slide 117 text

API Service Service A Service B Load Balancer Edge Gateway Service D Service D Service C Event based communication decouples services, lets us build reliable pipelines, and helps isolate failure

Slide 118

Slide 118 text

Simple systems are more reliable Small systems are faster to iterate Failure can be isolated and constrained

Slide 119

Slide 119 text

Standardisation makes everything easier Onboard new people quickly People feel empowered and productive Build reliable systems, faster.

Slide 120

Slide 120 text

No content

Slide 121

Slide 121 text

monzo.com/careers