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
360
Contexts in Context
mattheath
0
210
A guided journey of Cloud Native
mattheath
1
150
Modelling prototypes to critical systems with Cassandra
mattheath
0
250
Building a Cloud Native Bank
mattheath
1
210
Building a Cloud Native Bank
mattheath
0
360
Building reliable APIs
mattheath
0
290
Go and Microservices - NDC London 2018
mattheath
0
260
Architecting a Bank from scratch
mattheath
1
820
Other Decks in Technology
See All in Technology
GraphRAG グラフDBを使ったLLM生成(自作漫画DBを用いた具体例を用いて)
seaturt1e
1
150
AI AgentをLangflowでサクッと作って、1日働かせてみた!
yano13
1
160
スタートアップの現場で実践しているテストマネジメント #jasst_kyushu
makky_tyuyan
0
130
SQLAlchemy の select(User).where(User.id =="123") を理解してみる/sqlalchemy deep dive
3l4l5
3
380
ゼロコード計装導入後のカスタム計装でさらに可観測性を高めよう
sansantech
PRO
1
440
プロダクト開発と社内データ活用での、BI×AIの現在地 / Data_Findy
sansan_randd
0
150
ソフトウェアエンジニアの生成AI活用と、これから
lycorptech_jp
PRO
0
900
OCIjp_Oracle AI World_Recap
shinpy
1
180
頭部ふわふわ浄酔器
uyupun
0
110
AIプロダクトのプロンプト実践テクニック / Practical Techniques for AI Product Prompts
saka2jp
0
110
Biz職でもDifyでできる! 「触らないAIワークフロー」を実現する方法
igarashikana
7
3.4k
OpenTelemetry が拡げる Gemini CLI の可観測性
phaya72
2
2.3k
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
116
20k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
640
Documentation Writing (for coders)
carmenintech
75
5.1k
A designer walks into a library…
pauljervisheath
209
24k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
22k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
Music & Morning Musume
bryan
46
6.9k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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