Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Microservices & Go - GOTO Copenhagen 2016
Search
mattheath
October 04, 2016
Technology
2
1.6k
Microservices & Go - GOTO Copenhagen 2016
mattheath
October 04, 2016
Tweet
Share
More Decks by mattheath
See All by mattheath
Breaking down problems
mattheath
2
380
Contexts in Context
mattheath
0
230
A guided journey of Cloud Native
mattheath
1
180
Modelling prototypes to critical systems with Cassandra
mattheath
0
270
Building a Cloud Native Bank
mattheath
1
240
Building a Cloud Native Bank
mattheath
0
390
Building reliable APIs
mattheath
0
330
Go and Microservices - NDC London 2018
mattheath
0
280
Architecting a Bank from scratch
mattheath
1
840
Other Decks in Technology
See All in Technology
Phase04_ターミナル基礎
overflowinc
0
2.3k
DDD×仕様駆動で回す高品質開発のプロセス設計
littlehands
6
2.4k
【社内勉強会】新年度からコーディングエージェントを使いこなす - 構造と制約で引き出すClaude Codeの実践知
nwiizo
24
12k
Physical AI on AWS リファレンスアーキテクチャ / Physical AI on AWS Reference Architecture
aws_shota
1
130
開発チームとQAエンジニアの新しい協業モデル -年末調整開発チームで実践する【QAリード施策】-
qa
0
290
テストプロセスにおけるAI活用 :人間とAIの共存
hacomono
PRO
0
160
Bref でサービスを運用している話
sgash708
0
190
VSCode中心だった自分がターミナル沼に入門した話
sanogemaru
0
570
ThetaOS - A Mythical Machine comes Alive
aslander
0
170
Blue/Green Deployment を用いた PostgreSQL のメジャーバージョンアップ
kkato1
0
130
スピンアウト講座01_GitHub管理
overflowinc
0
1.3k
FlutterでPiP再生を実装した話
s9a17
0
160
Featured
See All Featured
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
240
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
140
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Accessibility Awareness
sabderemane
0
84
KATA
mclloyd
PRO
35
15k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
How GitHub (no longer) Works
holman
316
150k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
79
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
590
Leo the Paperboy
mayatellez
4
1.5k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Transcript
Microservices & Go Matt Heath, Monzo
None
Hi, I’m Matt @mattheath
None
None
None
monoliths traditional dev
None
None
None
None
None
None
None
None
None
?
Application
Application Database
Application Database
Application Databases
Application Databases Search
Application Databases Search Caching
Application Databases Search Caching CAT GIFS
ALL HAIL THE MONOLITH
None
Application Databases Search Caching CAT GIFS
APPLICATION Application
None
None
Single Responsibility Principle
Bounded Context
Well defined Interfaces
Composability
None
Simple
Lightweight Concurrency
// Blocking handleRequest()
// Runs concurrently // in a goroutine go handleRequest()
Go Routines
Channels
Static Linking
None
None
monzo/typhon
Service Service
Service Service Message Bus
Service Service Message Bus Request Queue
Service Service Message Bus Service Service Request Queue - Service
Discovery - Load Balancing
Service Service Message Bus Service Service Pull Request Queue
Service Service Message Bus Service Service
0 40 80 160 120 Feb 2015 Oct 2016
Service Service Message Bus Service Service Client library Server library
Service Service Service Service HTTP HTTP
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 HTTP HTTP ?
Service Service Service Service HTTP HTTP linkerd
Service Discovery Load Balancing Timeouts and Expirations Retries Rate Limiting
Connection Pooling Circuit Breaking Failure Detection Metrics and Tracing Interrupts Context Propagation
Load Balancer
Load Balancer HTTP API & Routing Layer
Load Balancer HTTP API & Routing Layer API Service
None
/webhooks —-> Webhook API
Load Balancer HTTP API & Routing Layer Webhook API
Auth Service Webhook Service Load Balancer HTTP API & Routing
Layer Webhook API
Auth Service Webhook Service Load Balancer HTTP API & Routing
Layer Webhook API Database
Database Auth Service Webhook Service Load Balancer HTTP API &
Routing Layer Webhook API Database
External Provider Database Auth Service Webhook Service Load Balancer HTTP
API & Routing Layer Webhook API Database
type Service func(req Request) Response
router.GET("/", List) router.POST("/", Register) router.DELETE("/:id", Deregister)
Making our service reliable
+ = ❤
None
Webhook Service Webhook Service Webhook Service Load Balancer HTTP API
& Routing Layer Webhook API
Webhook Service Webhook Service Webhook Service Load Balancer HTTP API
& Routing Layer Webhook API
Webhook Service Webhook Service Webhook Service Webhook Service Load Balancer
HTTP API & Routing Layer Webhook API
Webhook Service Webhook Service Webhook Service Webhook Service Load Balancer
HTTP API & Routing Layer Webhook API Slow or Errors
Event Driven Architecture
Service A Service B Load Balancer HTTP API & Routing
Layer API Service
API Service Service A Service B Load Balancer HTTP API
& Routing Layer
API Service Service A Service B Load Balancer HTTP API
& Routing Layer
API Service Service A Service B Load Balancer HTTP API
& Routing Layer Service C Service D Service E
Context Propagation
api api api.customer api.customer service.customer service.customer
api api api.customer api.customer service.customer service.customer
8096820c-3b7b-47ec-bce6-1c239252ab40
api api api.customer api.customer service.customer service.customer
api api api.customer api.customer service.customer service.customer
package context type Context interface { Deadline() (deadline time.Time, ok
bool) Done() <-chan struct{} Err() error Value(key interface{}) interface{} }
package context type Context interface { Deadline() (deadline time.Time, ok
bool) Done() <-chan struct{} Err() error Value(key interface{}) interface{} }
package context type Context interface { Deadline() (deadline time.Time, ok
bool) Done() <-chan struct{} Err() error Value(key interface{}) interface{} }
api api api.customer api.customer service.customer service.customer
api api api.customer api.customer service.customer service.customer SEND RECV SEND RECV
RECV SEND RECV SEND
api api.customer service.customer SEND RECV SEND RECV RECV SEND RECV
SEND phosphor
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
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
None
None
None
Small Simple Easy to learn
Concurrency Channels
Downsides?
Starting with Microservices?
Thanks! @mattheath @monzo
ATM: Thomas Hawk Bank of Commerce: ABQ Museum Archives IBM
System/360: IBM Absorbed: Saxbald Photography Go Gopher: Renee French Credits
None