Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Building reliable APIs
mattheath
July 10, 2018
Programming
0
190
Building reliable APIs
mattheath
July 10, 2018
Tweet
Share
More Decks by mattheath
See All by mattheath
Breaking down problems
mattheath
2
260
Contexts in Context
mattheath
0
130
A guided journey of Cloud Native
mattheath
1
100
Modelling prototypes to critical systems with Cassandra
mattheath
0
130
Building a Cloud Native Bank
mattheath
1
150
Building a Cloud Native Bank
mattheath
0
220
Go and Microservices - NDC London 2018
mattheath
0
130
Architecting a Bank from scratch
mattheath
1
640
Kubernetes in Context
mattheath
0
210
Other Decks in Programming
See All in Programming
ipa-medit: Memory search and patch tool for IPA without Jailbreaking/ipa-medit-bh2022-europe
tkmru
0
130
An Advanced Introduction to R
nicetak
0
1.8k
How to Fight Production Incidents?
asatarin
0
190
Amazon QuickSightのアップデート -re:Invent 2022の復習&2022年ハイライト-
shogo452
0
220
Quarto Tips for Academic Presentation
nicetak
0
920
Circuit⚡
monaapk
0
200
Swift Expression Macros: a practical introduction
kishikawakatsumi
2
720
SHOWROOMの分析目的を意識した伝え方・コミュニケーション
hatapu
0
240
What's new in Shopware 6.5
shyim
0
110
Writing Greener Java Applications
hollycummins
0
340
AWSにおける標的型Bot対策
hacomono
0
410
Gradle build: The time is now
nonews
1
460
Featured
See All Featured
Building Adaptive Systems
keathley
27
1.3k
Stop Working from a Prison Cell
hatefulcrawdad
263
18k
Why You Should Never Use an ORM
jnunemaker
PRO
49
7.9k
Fantastic passwords and where to find them - at NoRuKo
philnash
32
1.8k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
15
1.2k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
13
5.4k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
217
21k
Why Our Code Smells
bkeepers
PRO
326
55k
Teambox: Starting and Learning
jrom
124
7.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
182
15k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
351
21k
Robots, Beer and Maslow
schacon
154
7.3k
Transcript
Building Reliable APIs Matt Heath, Monzo
Matt Heath, Monzo @mattheath
None
None
monoliths traditional dev
None
What do we mean by “reliable”?
None
Contacting us Using your debit card Making payments Freezing your
card Viewing your balance Viewing recent transactions Sending emoji reactions Setting your profile picture Viewing merchant logos
Contacting us Using your debit card Making payments Freezing your
card Viewing your balance Viewing recent transactions Sending emoji reactions Setting your profile picture Viewing merchant logos
?
Application
Application
APPLICATION Application
None
None
?
None
API
API
API Gateway API Service API Service API Service API Service
API Service API Service API Service API Service
None
None
None
API Gateway Accounts Cards Pots Emojis Payments …
API Gateway Accounts Cards Pots Emojis Payments … New Exciting
API!!
Cards Pots Emojis Payments … API Gateway Accounts New Exciting
API!!
Cards Pots Emojis Payments … API Gateway Accounts New Exciting
API!!
API Gateway Accounts Cards Pots Emojis Payments … New Exciting
API!!
None
pod
pod container container container
pod API service
pod
pod
pods replica set
replica set pods deployment
pods replica set deployment
pods replica set deployment change
deployment change old pods old replica set
deployment change old pods old replica set new replica set
deployment change old pods old replica set new replica set
new pod
deployment change old pods old replica set new replica set
new pod
deployment change old replica set new pods new replica set
deployment change new replica set new pods
deployment replica set pods
pods
pods service
pods service kubedns
pods service routing - static cluster IP managed replicas resource
allocations rollout strategies liveness checks anti-affinity, etc kubedns routing - “service name”
?
machine
machine machine
machine machine machine machine machine machine
machine machine machine machine machine machine Kubernetes
machine machine machine machine machine kubelet
kubelet kubelet kubelet kubelet kubelet kubelet
kubelet kubelet kubelet kubelet kubelet kubelet Kubernetes Master
kubelet kubelet kubelet kubelet kubelet kubelet Kubernetes Master etcd
kubernetes
kubernetes service service service service service service service service service
service
kubernetes service service service service service service service service service
service
kubernetes service service service service service service service service service
service
kubernetes service service service service service service service service service
service
kubernetes service service service service service service service service service
service service service service
kubernetes service service service service service service service service service
service
Reliable inter-service communication
Service Service
Service Service Service Service
Service Service Service Service Kubernetes Service
Service Discovery Load Balancing Timeouts and Expirations Retries Rate Limiting
Connection Pooling Circuit Breaking Failure Detection Metrics and Tracing Interrupts Context Propagation
Service Discovery Load Balancing Timeouts and Expirations Retries Rate Limiting
Connection Pooling Circuit Breaking Failure Detection Metrics and Tracing Interrupts Context Propagation
Service Service Service Service ?
Service Service Service Service linkerd
Service linkerd
Service linkerd service discovery
Service Service Service Service linkerd service discovery
Service Service Service Service linkerd
Service Service Service Service linkerd
Service Service Service Service linkerd
Service Service Service Service linkerd
Event Driven Architecture
Service A Service B Load Balancer Edge Gateway API Service
API Service Service A Service B Load Balancer Edge Gateway
API Service Service A Service B Load Balancer Edge Gateway
Service D Service E
API Service Service A Service B Load Balancer Edge Gateway
Service C Service D Service E
API Service Service A Service B Load Balancer Edge Gateway
Service C Service D Service E
API Service Service A Service B Load Balancer Edge Gateway
Service C Service D Service E
API Service Service A Service B Load Balancer Edge Gateway
Service C Service D Service E
API Service Service A Service B Load Balancer Edge Gateway
Service C Service D Service E Service D
API Service Service A Service B Load Balancer Edge Gateway
Service C Service D Service E Service D
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
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
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
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
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
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
None
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
None
Critical Path
How do we make systems reliable?
Masterless systems No single points of failure Simple / small
components Minimise critical path Queue deferrable tasks Automated failure correction
None
None
None