Slide 1

Slide 1 text

Building a Cloud-Native Bank Matt Heath, Monzo

Slide 2

Slide 2 text

! ⛅ #

Slide 3

Slide 3 text

Hi, I’m Matt

Slide 4

Slide 4 text

@mattheath

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

Nov 2015 Oct 2018 CUSTOMER
 GROWTH

Slide 8

Slide 8 text

$ 1,031,133

Slide 9

Slide 9 text

£4 billion spent %

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

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

#

Slide 19

Slide 19 text

&

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

'

Slide 22

Slide 22 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 23

Slide 23 text

Henrik Kniberg

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

?

Slide 26

Slide 26 text

Slide 27

Slide 27 text

Slide 28

Slide 28 text

Slide 29

Slide 29 text

Henrik Kniberg

Slide 30

Slide 30 text

James Leah Matt

Slide 31

Slide 31 text

James Leah Matt *

Slide 32

Slide 32 text

James Leah Matt +

Slide 33

Slide 33 text

,

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

- - -

Slide 37

Slide 37 text

- - - X X X

Slide 38

Slide 38 text

-

Slide 39

Slide 39 text

% - %

Slide 40

Slide 40 text

.

Slide 41

Slide 41 text

- ☕☕

Slide 42

Slide 42 text

☕☕ - %

Slide 43

Slide 43 text

Slide 44

Slide 44 text

EXTENSIBLE SCALABLE RELIABLE SECURE
 CHEAP

Slide 45

Slide 45 text

?

Slide 46

Slide 46 text

Application

Slide 47

Slide 47 text

Application

Slide 48

Slide 48 text

APPLICATION Application

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 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 53

Slide 53 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
 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

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

?

Slide 59

Slide 59 text

EC2
 Instance

Slide 60

Slide 60 text

instance instance

Slide 61

Slide 61 text

instance instance instance instance instance instance

Slide 62

Slide 62 text

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

Slide 63

Slide 63 text

instance instance instance instance instance instance Kubernetes

Slide 64

Slide 64 text

instance instance instance instance instance kubelet

Slide 65

Slide 65 text

kubelet kubelet kubelet kubelet kubelet kubelet

Slide 66

Slide 66 text

kubelet kubelet kubelet kubelet kubelet kubelet Kubernetes Master

Slide 67

Slide 67 text

kubelet kubelet kubelet kubelet kubelet kubelet Kubernetes Master etcd

Slide 68

Slide 68 text

kubelet kubelet kubelet kubelet kubelet kubelet Kubernetes Master etcd

Slide 69

Slide 69 text

etcd

Slide 70

Slide 70 text

etcd etcd etcd

Slide 71

Slide 71 text

etcd etcd etcd etcd etcd etcd etcd etcd etcd

Slide 72

Slide 72 text

etcd etcd etcd etcd etcd etcd etcd etcd etcd quorum = 5 or more nodes alive (n/2+1)

Slide 73

Slide 73 text

etcd etcd etcd etcd etcd etcd etcd etcd etcd quorum maintained

Slide 74

Slide 74 text

etcd etcd etcd etcd etcd etcd etcd etcd etcd quorum maintained '

Slide 75

Slide 75 text

etcd etcd etcd etcd etcd unhealthy machines terminated 0

Slide 76

Slide 76 text

etcd etcd etcd etcd etcd etcd etcd etcd etcd new machines automatically reattach EBS, cluster recovers 1

Slide 77

Slide 77 text

etcd ASG 4 etcd ASG 7 etcd ASG 1 etcd ASG 5 etcd ASG 8 etcd ASG 2 etcd ASG 3 etcd ASG 6 etcd ASG 0 each etcd node is an autoscaling group of 1, with a fixed identity

Slide 78

Slide 78 text

etcd etcd etcd etcd etcd etcd etcd etcd etcd quorum lost 2

Slide 79

Slide 79 text

etcd etcd etcd etcd unhealthy machines terminated 0

Slide 80

Slide 80 text

etcd etcd etcd etcd etcd ASG 7 etcd ASG 1 etcd ASG 8 etcd ASG 2 etcd ASG 6 autoscaling groups start new instances

Slide 81

Slide 81 text

etcd etcd etcd etcd etcd etcd etcd etcd etcd unhealthy machines replaced automatically, EBS reattached, cluster recovers 3

Slide 82

Slide 82 text

Blog

Slide 83

Slide 83 text

kubernetes

Slide 84

Slide 84 text

kubernetes pod pod pod pod pod pod pod pod pod pod

Slide 85

Slide 85 text

pod container service

Slide 86

Slide 86 text

pod scratch container go service

Slide 87

Slide 87 text

kubernetes service service service service service service service service service service

Slide 88

Slide 88 text

kubernetes service service service service service service service service service service

Slide 89

Slide 89 text

kubernetes service service service service service service service service service service

Slide 90

Slide 90 text

kubernetes service service service service service service service service service service

Slide 91

Slide 91 text

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

Slide 92

Slide 92 text

kubernetes service service service service service service service service service service

Slide 93

Slide 93 text

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

Slide 94

Slide 94 text

4

Slide 95

Slide 95 text

1

Slide 96

Slide 96 text

Request Limit

Slide 97

Slide 97 text

CPU Throttling

Slide 98

Slide 98 text

No content

Slide 99

Slide 99 text

API

Slide 100

Slide 100 text

API

Slide 101

Slide 101 text

API Gateway API Service API Service API Service API Service API Service API Service API Service API Service

Slide 102

Slide 102 text

No content

Slide 103

Slide 103 text

No content

Slide 104

Slide 104 text

No content

Slide 105

Slide 105 text

API Gateway Accounts Cards Pots Feed Payments …

Slide 106

Slide 106 text

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

Slide 107

Slide 107 text

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

Slide 108

Slide 108 text

Cards Pots Payments … API Gateway Accounts New
 Exciting
 API!! 0 0 0 0 0 6 Feed

Slide 109

Slide 109 text

API Gateway Accounts Cards Pots Payments … New
 Exciting
 API!! 5 6 Feed

Slide 110

Slide 110 text

Service Service

Slide 111

Slide 111 text

Service Service Service Service

Slide 112

Slide 112 text

Service Service Service Service Kubernetes
 Service

Slide 113

Slide 113 text

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

Slide 114

Slide 114 text

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

Slide 115

Slide 115 text

Service Service Service Service ?

Slide 116

Slide 116 text

Service Service Service Service linkerd

Slide 117

Slide 117 text

Service linkerd

Slide 118

Slide 118 text

Service linkerd service
 discovery

Slide 119

Slide 119 text

Service Service Service Service linkerd service
 discovery

Slide 120

Slide 120 text

Service Service Service Service linkerd

Slide 121

Slide 121 text

Service Service Service Service linkerd

Slide 122

Slide 122 text

Service Service Service Service linkerd

Slide 123

Slide 123 text

Service Service Service Service linkerd

Slide 124

Slide 124 text

kind: DaemonSet metadata: name: linkerd spec: template: spec: containers: - name: linkerd image: ecr:linkerd_vXXX - "/etc/linkerd/linkerd.yaml" volumeMounts: - name: linkerd-config mountPath: /etc/linkerd readOnly: true ports: - name: http containerPort: 443 hostPort: 4140 env: - name: POD_IP valueFrom: fieldRef: fieldPath: status.podIP resources: limits: cpu: 4 memory: 2Gi monzo.com/cpu-period: 2500 requests: cpu: 1 memory: 1Gi services send requests to local
 linkerd daemonset linkerd daemonset pods & services
 on other machines

Slide 125

Slide 125 text

No content

Slide 126

Slide 126 text

No content

Slide 127

Slide 127 text

No content

Slide 128

Slide 128 text

Event Driven
 Architecture

Slide 129

Slide 129 text

Service A Service B Load Balancer Edge Gateway API Service

Slide 130

Slide 130 text

API Service Service A Service B Load Balancer Edge Gateway

Slide 131

Slide 131 text

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

Slide 132

Slide 132 text

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

Slide 133

Slide 133 text

API Service Service A Service B Load Balancer Edge Gateway Service C Service D Service E 6

Slide 134

Slide 134 text

API Service Service A Service B Load Balancer Edge Gateway Service C Service D Service E 6 7

Slide 135

Slide 135 text

API Service Service A Service B Load Balancer Edge Gateway Service C Service D Service E 6 7 7 7 7

Slide 136

Slide 136 text

API Service Service A Service B Load Balancer Edge Gateway Service C Service D Service E 6 7 7 7 7 Service D

Slide 137

Slide 137 text

API Service Service A Service B Load Balancer Edge Gateway Service C Service D Service E 6 Service D

Slide 138

Slide 138 text

8

Slide 139

Slide 139 text

API Service API Service Load Balancer Monzo API Gateway API Service

Slide 140

Slide 140 text

API Service API Service Load Balancer Monzo API Gateway API Service

Slide 141

Slide 141 text

API Service API Service Application Load Balancer (ALB) Monzo API Gateway API Service

Slide 142

Slide 142 text

API Service API Service Application Load Balancer (ALB) Monzo API Gateway API Service AWS Shield AWS WAF

Slide 143

Slide 143 text

API Service API Service Application Load Balancer (ALB) Monzo API Gateway API Service AWS Shield AWS WAF AWS API

Slide 144

Slide 144 text

API Service API Service Application Load Balancer (ALB) Monzo API Gateway API Service AWS Shield AWS WAF AWS API

Slide 145

Slide 145 text

API Service API Service Application Load Balancer (ALB) Monzo API Gateway API Service AWS Shield AWS WAF AWS API

Slide 146

Slide 146 text

API Service API Service Application Load Balancer (ALB) Monzo API Gateway API Service AWS Shield AWS WAF AWS API Reject traffic at ALB Update rules
 via API

Slide 147

Slide 147 text

API Service API Service Application Load Balancer (ALB) Monzo API Gateway API Service AWS Shield AWS WAF AWS API Reject traffic at ALB Update rules
 via API

Slide 148

Slide 148 text

API Service API Service Application Load Balancer (ALB) Monzo API Gateway API Service AWS Shield AWS WAF 8

Slide 149

Slide 149 text

API Service API Service Application Load Balancer (ALB) Monzo API Gateway API Service 8

Slide 150

Slide 150 text

API Service API Service Application Load Balancer (ALB) Monzo API Gateway API Service 8 service

Slide 151

Slide 151 text

API Service API Service Application Load Balancer (ALB) Monzo API Gateway API Service 8 service &

Slide 152

Slide 152 text

No content

Slide 153

Slide 153 text

No content

Slide 154

Slide 154 text

API Service API Service Application Load Balancer (ALB) Monzo API Gateway API Service 8 service VPC Segregation
 Network ACLs Sec Groups

Slide 155

Slide 155 text

API Service API Service Application Load Balancer (ALB) Monzo API Gateway API Service 8 service 8

Slide 156

Slide 156 text

instance instance instance instance instance instance instance instance instance 9

Slide 157

Slide 157 text

instance instance instance instance instance instance instance instance instance 9 IAM Auditing CloudTrail 8

Slide 158

Slide 158 text

No content

Slide 159

Slide 159 text

:

Slide 160

Slide 160 text

No content

Slide 161

Slide 161 text

Ship it and iterate
 Make changes small
 Make changes often Technical debt as a tool

Slide 162

Slide 162 text

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

Slide 163

Slide 163 text

No content

Slide 164

Slide 164 text

Production load tests & Shadow Traffic

Slide 165

Slide 165 text

EXTENSIBLE SCALABLE RELIABLE SECURE
 CHEAP

Slide 166

Slide 166 text

Empower teams

Slide 167

Slide 167 text

monzo.com/careers