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.5k
Microservices & Go - GOTO Copenhagen 2016
mattheath
October 04, 2016
Tweet
Share
More Decks by mattheath
See All by mattheath
Breaking down problems
mattheath
2
300
Contexts in Context
mattheath
0
160
A guided journey of Cloud Native
mattheath
1
120
Modelling prototypes to critical systems with Cassandra
mattheath
0
160
Building a Cloud Native Bank
mattheath
1
170
Building a Cloud Native Bank
mattheath
0
270
Building reliable APIs
mattheath
0
230
Go and Microservices - NDC London 2018
mattheath
0
210
Architecting a Bank from scratch
mattheath
1
740
Other Decks in Technology
See All in Technology
本当のAWS基礎
toru_kubota
0
500
AOAI をきっかけに 社内の Azure 管理を見直した話
recruitengineers
PRO
1
270
Cloud Native Java with Spring Boot (CNCF Aarhus, April 2024)
thomasvitale
1
170
web-application-security
matsuihidetoshi
0
160
Python と Snowflake はズッ友だょ!~ Snowflake の Python 関連機能をふりかえる ~
__allllllllez__
1
110
プロトタイピングによる不確実性の低減 / Reducing Uncertainty through Prototyping
ohbarye
5
380
どうするコスト最適化のトレードオフ
tetsuyaooooo
1
500
長期間TiDBを使ってきた話 @ 私たちはなぜNewSQLを使うのかTiDB選定5社が語る選定理由と活用LT / Experiences with TiDB Over Time
chibiegg
2
890
プラットフォームってつくることより計測することが重要なんじゃないかという話 / Platform Engineering Meetup #8
taishin
1
350
チームでロジカルシンキングに改めて向き合っている話 〜学習環境と実践⽅法〜
sansantech
PRO
2
2.1k
開発パフォーマンスを最大化するための開発体制
ham0215
2
290
FrontDoorとWebAppsを組み合わせた際のリダイレクト処理の注意点
kenichirokimura
1
500
Featured
See All Featured
Robots, Beer and Maslow
schacon
PRO
155
7.9k
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
Building Effective Engineering Teams - LeadDev
addyosmani
28
1.8k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
[RailsConf 2023] Rails as a piece of cake
palkan
23
3.9k
Typedesign – Prime Four
hannesfritz
36
2.1k
Scaling GitHub
holman
457
140k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
Why Our Code Smells
bkeepers
PRO
331
56k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
2
3.4k
Building Your Own Lightsaber
phodgson
99
5.7k
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