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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
mattheath
October 04, 2016
Technology
1.6k
2
Share
Microservices & Go - GOTO Copenhagen 2016
mattheath
October 04, 2016
More Decks by mattheath
See All by mattheath
Breaking down problems
mattheath
2
390
Contexts in Context
mattheath
0
240
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
250
Building a Cloud Native Bank
mattheath
0
390
Building reliable APIs
mattheath
0
340
Go and Microservices - NDC London 2018
mattheath
0
280
Architecting a Bank from scratch
mattheath
1
850
Other Decks in Technology
See All in Technology
AIと乗り切った1,500ページ超のヘルプサイト基盤刷新とさらにその先の話
mugi_uno
1
270
20年前の「OSS革命」に学ぶ AI時代の生存戦略
samakada
0
530
多角的な視点から見たAGI
terisuke
0
110
「QA=テスト」「シフトレフト=スクラムイベントの参加者の一員」の呪縛を解く。アジャイルな開発を止めないために、10Xで挑んだ「右側のしわ寄せ」解消記 #scrumniigata
nihonbuson
PRO
3
410
Forget technical debt
ufried
0
150
AI バイブコーティングでキーボード不要?!
samakada
0
670
VespaのParent Childを用いたフィードパフォーマンスの改善
taking
0
180
AndroidアプリとCopilot Studioの統合
nakasho
0
190
AWS Agent Registry の基礎・概要を理解する/aws-agent-registry-intro
ren8k
3
430
Cortex Codeのコスト見積ヒントご紹介
yokatsuki
0
130
ファインディの事業拡大を支える 拡張可能なデータ基盤へのリアーキテクチャ
hiracky16
0
750
Anthropic「Long-running a gents」をGeminiで再現してみた
tkikuchi
0
760
Featured
See All Featured
Paper Plane (Part 1)
katiecoart
PRO
0
6.9k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.2k
The Limits of Empathy - UXLibs8
cassininazir
1
320
The SEO Collaboration Effect
kristinabergwall1
1
430
We Have a Design System, Now What?
morganepeng
55
8.1k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
130
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
Navigating Team Friction
lara
192
16k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
The Cost Of JavaScript in 2023
addyosmani
55
9.9k
Thoughts on Productivity
jonyablonski
76
5.1k
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