Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text


 Architecting a Bank
 from scratch Matt Heath, Monzo

Slide 3

Slide 3 text

! ➡

Slide 4

Slide 4 text

Hi, I’m Matt @mattheath

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 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
 2017 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 7

Slide 7 text

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
 2017 JAN
 2016 Feb
 2015 APR
 2017 PREPAID
 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

Slide 8

Slide 8 text

Nov 2015 Nov 2017 CUSTOMER
 GROWTH

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

No content

Slide 13

Slide 13 text

BUILD A PROTOTYPE

Slide 14

Slide 14 text

Henrik Kniberg

Slide 15

Slide 15 text

DEBT EXCHANGE

Slide 16

Slide 16 text

James Leah Matt

Slide 17

Slide 17 text

James Leah Matt

Slide 18

Slide 18 text

James Leah Matt

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

No content

Slide 23

Slide 23 text

X X X

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

☕☕

Slide 28

Slide 28 text

☕☕

Slide 29

Slide 29 text

?

Slide 30

Slide 30 text

monoliths traditional dev

Slide 31

Slide 31 text

Application

Slide 32

Slide 32 text

Application Database

Slide 33

Slide 33 text

Application Database

Slide 34

Slide 34 text

Application Databases

Slide 35

Slide 35 text

Application Databases Search

Slide 36

Slide 36 text

Application Databases Search Caching

Slide 37

Slide 37 text

Application Databases Search Caching CAT GIFS

Slide 38

Slide 38 text

ALL HAIL THE MONOLITH

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

Application Databases Search Caching CAT GIFS

Slide 41

Slide 41 text

APPLICATION Application

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

LEDGER
 PAYMENT API MOBILE APP

Slide 45

Slide 45 text

Payment API Ledger

Slide 46

Slide 46 text

Payment API Ledger Postgres

Slide 47

Slide 47 text

Transactions Payment API Ledger

Slide 48

Slide 48 text

Transactions Payment API Ledger Accounts

Slide 49

Slide 49 text

Payment API Transactions Ledger Accounts Cassandra Postgres

Slide 50

Slide 50 text

COMMUNICATION BUILD DEPLOYMENT

Slide 51

Slide 51 text

Payment API Transactions Ledger Accounts Cassandra Postgres ? ? ? ? ? ? ? ? ?

Slide 52

Slide 52 text

Henrik Kniberg

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

No content

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

Payment API Transactions Ledger Accounts Cassandra Postgres

Slide 59

Slide 59 text

Card API Payment API Transactions Ledger Accounts Cassandra Postgres

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

No content

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

Feb 2015 services Nov 2017 350

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

?

Slide 71

Slide 71 text

server

Slide 72

Slide 72 text

server server

Slide 73

Slide 73 text

server server server server server server

Slide 74

Slide 74 text

server server server server server server ?

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

pod

Slide 77

Slide 77 text

pod container container container

Slide 78

Slide 78 text

pod transaction service

Slide 79

Slide 79 text

pod web server config volume

Slide 80

Slide 80 text

pod volume

Slide 81

Slide 81 text

pod

Slide 82

Slide 82 text

pod

Slide 83

Slide 83 text

pods replica set

Slide 84

Slide 84 text

replica set pods deployment

Slide 85

Slide 85 text

pods replica set deployment

Slide 86

Slide 86 text

pods replica set deployment change

Slide 87

Slide 87 text

deployment change old pods old replica set

Slide 88

Slide 88 text

deployment change old pods old replica set new replica set

Slide 89

Slide 89 text

deployment change old pods old replica set new replica set new pod

Slide 90

Slide 90 text

deployment change old pods old replica set new replica set new pod

Slide 91

Slide 91 text

deployment change old replica set new pods new replica set

Slide 92

Slide 92 text

deployment change new replica set new pods

Slide 93

Slide 93 text

deployment replica set pods

Slide 94

Slide 94 text

pods

Slide 95

Slide 95 text

pods service

Slide 96

Slide 96 text

pods service kubedns

Slide 97

Slide 97 text

pods service routing - static cluster IP managed replicas resource allocations rollout strategies liveness checks anti-affinity, etc kubedns

Slide 98

Slide 98 text

server server server server server server

Slide 99

Slide 99 text

server server server server server server Kubernetes

Slide 100

Slide 100 text

server server server server server kubelet

Slide 101

Slide 101 text

kubelet kubelet kubelet kubelet kubelet kubelet

Slide 102

Slide 102 text

kubelet kubelet kubelet kubelet kubelet kubelet Kubernetes Master

Slide 103

Slide 103 text

kubelet kubelet kubelet kubelet kubelet kubelet Kubernetes Master etcd

Slide 104

Slide 104 text

kubernetes

Slide 105

Slide 105 text

No content

Slide 106

Slide 106 text

+ = ❤

Slide 107

Slide 107 text

kubernetes service service service service service service service service service service

Slide 108

Slide 108 text

Service Service

Slide 109

Slide 109 text

Service Service RabbitMQ

Slide 110

Slide 110 text

Service Service RabbitMQ

Slide 111

Slide 111 text

Service Service Transport

Slide 112

Slide 112 text

Service Service Transport Service Service

Slide 113

Slide 113 text

Service Service Transport Service Service Client library Server library

Slide 114

Slide 114 text

Service Discovery Load Balancing Timeouts Failure Detection Retries Rate Limiting Circuit Breaking Connection Pooling Context Propagation Metrics and Tracing Request Cancellation

Slide 115

Slide 115 text

Service Service Service Service

Slide 116

Slide 116 text

Service Service Service Service HTTP HTTP

Slide 117

Slide 117 text

Service Service Service Service Kubernetes
 Service

Slide 118

Slide 118 text

Service Discovery Load Balancing Timeouts Failure Detection Retries Rate Limiting Circuit Breaking Connection Pooling Context Propagation Metrics and Tracing Request Cancellation

Slide 119

Slide 119 text

Service Discovery Load Balancing Timeouts Failure Detection Retries Rate Limiting Circuit Breaking Connection Pooling Context Propagation Metrics and Tracing Request Cancellation

Slide 120

Slide 120 text

Service Service Service Service ?

Slide 121

Slide 121 text

Service Service Service Service linkerd

Slide 122

Slide 122 text

Service linkerd

Slide 123

Slide 123 text

Service linkerd service
 discovery

Slide 124

Slide 124 text

Service Service Service Service linkerd service
 discovery

Slide 125

Slide 125 text

Service Service Service Service linkerd

Slide 126

Slide 126 text

Service Service Service Service linkerd

Slide 127

Slide 127 text

Service Service Service Service linkerd

Slide 128

Slide 128 text

Service Service Service Service linkerd

Slide 129

Slide 129 text

THE BIG SWITCH

Slide 130

Slide 130 text

Services Cassandra Load Balancer API

Slide 131

Slide 131 text

Mesos
 RabbitMQ API Cassandra Load Balancer

Slide 132

Slide 132 text

Mesos
 RabbitMQ API Cassandra Load Balancer Proxy

Slide 133

Slide 133 text

Cassandra Load Balancer Mesos
 RabbitMQ API Proxy

Slide 134

Slide 134 text

Cassandra Load Balancer Mesos
 RabbitMQ API Proxy Kubernetes
 HTTP & LinkerD

Slide 135

Slide 135 text

Cassandra Load Balancer Mesos
 RabbitMQ API Proxy Kubernetes
 HTTP & LinkerD

Slide 136

Slide 136 text

Cassandra Load Balancer Proxy Kubernetes
 HTTP & LinkerD

Slide 137

Slide 137 text

Cassandra Load Balancer Kubernetes
 HTTP & LinkerD

Slide 138

Slide 138 text

No content

Slide 139

Slide 139 text

STRUCTURE
 COMMUNICATION BUILD DEPLOYMENT

Slide 140

Slide 140 text

No content

Slide 141

Slide 141 text

API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns

Slide 142

Slide 142 text

API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns

Slide 143

Slide 143 text

API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns

Slide 144

Slide 144 text

API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns

Slide 145

Slide 145 text

API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns

Slide 146

Slide 146 text

No content

Slide 147

Slide 147 text

API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns

Slide 148

Slide 148 text

No content

Slide 149

Slide 149 text

No content

Slide 150

Slide 150 text

OTHER CHALLENGES

Slide 151

Slide 151 text

NETWORKS ARE HARD

Slide 152

Slide 152 text

Amazon 
 eu-west-1

Slide 153

Slide 153 text

Amazon 
 eu-west-1

Slide 154

Slide 154 text

No content

Slide 155

Slide 155 text

Amazon 
 eu-west-1 colocation
 dc 1 colocation
 dc 2

Slide 156

Slide 156 text

Amazon 
 eu-west-1 colocation
 dc 1 colocation
 dc 2

Slide 157

Slide 157 text

Amazon 
 eu-west-1 colocation
 dc 1 colocation
 dc 2

Slide 158

Slide 158 text

Amazon 
 eu-west-1 colocation
 dc 1 colocation
 dc 2 BGP BGP BGP BGP

Slide 159

Slide 159 text

Amazon 
 eu-west-1 colocation
 dc 1 colocation
 dc 2 BGP BGP

Slide 160

Slide 160 text

Amazon 
 eu-west-1 colocation
 dc 1 colocation
 dc 2

Slide 161

Slide 161 text

pods service routing - static cluster IP non-static IP
 /24 range assigned per node

Slide 162

Slide 162 text

third parties colocation “connectivity” pod services HA VPN
 Appliance VPN client Kubernetes

Slide 163

Slide 163 text

third parties colocation “connectivity” pod service HA VPN
 Appliance Kubernetes Wireguard
 network
 interface service pod GUE 
 forwarder routing table
 routes specific
 IP range to local
 gue0 interface GUE 
 listener routing table
 routes packets
 to local wg0
 interface *lots of stuff omitted for brevity, this is a lot more complicated than the diagram implies

Slide 164

Slide 164 text

Amazon 
 eu-west-1 Yay abstraction!

Slide 165

Slide 165 text

NETWORK ISOLATION

Slide 166

Slide 166 text

No content

Slide 167

Slide 167 text

No content

Slide 168

Slide 168 text

SECRET STORAGE

Slide 169

Slide 169 text

STATEFUL SERVICES

Slide 170

Slide 170 text

TESTING MICROSERVICES

Slide 171

Slide 171 text

API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns

Slide 172

Slide 172 text

No content

Slide 173

Slide 173 text

No content

Slide 174

Slide 174 text

No content

Slide 175

Slide 175 text

No content