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
Bulletproof communication in distributed systems
Search
Jakub Kubryński
March 30, 2019
Programming
0
460
Bulletproof communication in distributed systems
Jakub Kubryński
March 30, 2019
Tweet
Share
More Decks by Jakub Kubryński
See All by Jakub Kubryński
Autonomous deployments in modern distributed systems
jkubrynski
1
110
JVM Workshop
jkubrynski
1
180
Engineering architecture
jkubrynski
0
760
Case study of the good enough architecture
jkubrynski
0
370
JPA - Beyond Copy-Paste
jkubrynski
3
1.5k
Microservices - The Naked Truth Of The Maintainability
jkubrynski
1
670
Other Decks in Programming
See All in Programming
GraphQLとGigaViewer for Apps
numeroanddev
4
880
tsconfig.jsonの最近の新機能 ファイルパス編
uhyo
6
1.3k
フロントエンドの現在地とこれから
koba04
6
3k
Re:PandasAI:生成AIがデータ分析業務にもたらすパラダイムシフト【増補改訂版】
negi111111
1
760
データサイエンスのフルサイクル開発を実現する機械学習パイプライン
xcnkx
2
460
Applied NLP in the Age of Generative AI
inesmontani
PRO
3
1.1k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
1.1k
モジュラモノリス、その前に / Modular monolith, before that
euglena1215
4
480
Findy - エンジニア向け会社紹介 / Findy Letter for Engineers
findyinc
4
93k
5年分のツケを一気に払った話
soogie
3
1.1k
[KR] Server Driven Compose With Firebase
skydoves
1
120
"型"のあるRailsアプリケーション開発 / Typed Rails application development
sinsoku
8
2.2k
Featured
See All Featured
Web Components: a chance to create the future
zenorocha
310
42k
A Philosophy of Restraint
colly
202
16k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
279
13k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
30
2.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
32k
Designing with Data
zakiwarfel
98
5.1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
26
4k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
The Pragmatic Product Professional
lauravandoore
31
6.2k
Documentation Writing (for coders)
carmenintech
65
4.3k
A designer walks into a library…
pauljervisheath
201
24k
Transcript
@jkubrynski / kubrynski.com @jkubrynski / kubrynski.com BULLETPROOF BULLETPROOF COMMUNICATION COMMUNICATION
JAKUB KUBRYNSKI JAKUB KUBRYNSKI
[email protected]
/ @jkubrynski / kubrynski.blog
$ WHOAMI $ WHOAMI DEVSKILLER CO-FOUNDER DEVSKILLER CO-FOUNDER BOTTEGA TRAINER
BOTTEGA TRAINER DEVOXX.PL PROGRAM COMMITTEE MEMBER DEVOXX.PL PROGRAM COMMITTEE MEMBER SPRING CLOUD CONTRACT CO-AUTHOR SPRING CLOUD CONTRACT CO-AUTHOR
DEVSKILLER IS LOOKING FOR DEVSKILLER IS LOOKING FOR HELLO-WORLD DEVELOPERS
HELLO-WORLD DEVELOPERS
WHY DISTRIBUTED SYSTEMS? WHY DISTRIBUTED SYSTEMS? SCALABILITY SCALABILITY POLYGLOT POLYGLOT
RESILIENCE RESILIENCE
DISTRIBUTED SYSTEMS FALLACIES DISTRIBUTED SYSTEMS FALLACIES THE NETWORK IS RELIABLE
THE NETWORK IS RELIABLE LATENCY IS ZERO LATENCY IS ZERO THE NETWORK IS SECURE THE NETWORK IS SECURE TOPOLOGY DOESN'T CHANGE TOPOLOGY DOESN'T CHANGE
IF YOU WON'T RESPECT FALLACIES IF YOU WON'T RESPECT FALLACIES
YOU'LL BUILD DISTRIBUTED MONOLITH YOU'LL BUILD DISTRIBUTED MONOLITH
BRACE YOURSELF BRACE YOURSELF FAILURE IS COMING FAILURE IS COMING
IN MONOLITH ALL COLLABORATORS ARE IN MONOLITH ALL COLLABORATORS ARE
ALWAYS AVAILABLE ALWAYS AVAILABLE
IN DISTRIBUTED SYSTEMS THEY ARE NOT IN DISTRIBUTED SYSTEMS THEY
ARE NOT NETWORK ISSUES NETWORK ISSUES REDEPLOYS REDEPLOYS OUTAGES OUTAGES
AVAILABILITY VS DOWNTIME AVAILABILITY VS DOWNTIME 9 9 . 9
9 9 % 35d 4d 8h 50m 5m per year 2.5h 14m 1.5m 8s 0.8s per day
99.9 (1.5 MIN/DAY) 99.9 (1.5 MIN/DAY) 5 * 99.9 =>
99.5 (7 MIN/DAY) 5 * 99.9 => 99.5 (7 MIN/DAY)
TEMPORAL COUPLING TEMPORAL COUPLING
DESIGN FOR FAILURE DESIGN FOR FAILURE
PREFER ASYNCHRONOUS PREFER ASYNCHRONOUS OVER SYNCHRONOUS OVER SYNCHRONOUS
ASYNCHRONOUS ACTORS ASYNCHRONOUS ACTORS COMMANDS (QUEUES) COMMANDS (QUEUES) EVENTS (TOPICS)
EVENTS (TOPICS)
ASYNCHRONOUS PRINCIPLES ASYNCHRONOUS PRINCIPLES PERSISTENT PERSISTENT AT-LEAST-ONCE DELIVERY AT-LEAST-ONCE DELIVERY
EXPONENTIAL RETRIES EXPONENTIAL RETRIES
SYNCHRONOUS SYNCHRONOUS IS USED ONLY WHEN REQUIRED IS USED ONLY
WHEN REQUIRED
WHAT COULD POSSIBLY GO WRONG? WHAT COULD POSSIBLY GO WRONG?
¯\_(ツ)_/¯ ¯\_(ツ)_/¯
TIMEOUT?!?! TIMEOUT?!?! RETRY RETRY
CIRCUIT BREAKER CIRCUIT BREAKER KEEP CALM AND FALLBACK KEEP CALM
AND FALLBACK
IN MONOLITH TOPOLOGY IS FIXED IN MONOLITH TOPOLOGY IS FIXED
IN DISTRIBUTED SYSTEMS IT'S NOT IN DISTRIBUTED SYSTEMS IT'S NOT
CLOUD NATIVE / CONTAINERS CLOUD NATIVE / CONTAINERS DYNAMIC SCALABILITY DYNAMIC SCALABILITY
ALWAYS USE SERVICE DISCOVERY ALWAYS USE SERVICE DISCOVERY
LOAD BALANCERS SUCKS LOAD BALANCERS SUCKS IT'S SINGLE POINT OF
FAILURE IT'S SINGLE POINT OF FAILURE
ALWAYS USE CLIENT SIDE LOAD BALACING ALWAYS USE CLIENT SIDE
LOAD BALACING
IT'S ALL ABOUT COMMUNICATION IT'S ALL ABOUT COMMUNICATION SO NICE
TO KNOW IT WORKS SO NICE TO KNOW IT WORKS
DISTRIBUTED SYSTEMS DISTRIBUTED SYSTEMS VS VS MICROSERVICES MICROSERVICES
MICROSERVICES BRING MICROSERVICES BRING AUTONOMY AUTONOMY
AUTONOMY IS HARD AUTONOMY IS HARD BECAUSE WE NEED TO
COORDINATE DEPENDENCIES BECAUSE WE NEED TO COORDINATE DEPENDENCIES AND BE BACKWARD COMPATIBLE AND BE BACKWARD COMPATIBLE
LOOSE COUPLING LOOSE COUPLING OVER OVER CANONICAL MODEL CANONICAL MODEL
END-TO-END TESTS ARE HARD END-TO-END TESTS ARE HARD FALSE-NEGATIVE FALSE-NEGATIVE
FALSE-POSITIVE FALSE-POSITIVE
VERIFY CONTRACTS VERIFY CONTRACTS A == C && B ==
C A == C && B == C A == B A == B
CONTRACT CONVERTS TO CONTRACT CONVERTS TO SERVER TEST SERVER TEST
CLIENT STUB CLIENT STUB
PERFORMANCE? PERFORMANCE?
MONITORING IS THE NEW TESTING MONITORING IS THE NEW TESTING
MONITORING MONITORING EXCEPTIONS EXCEPTIONS BUSINESS METRICS BUSINESS METRICS APPLICATION PERFORMANCE
MANAGEMENT APPLICATION PERFORMANCE MANAGEMENT
ANSCOMBE'S QUARTET ANSCOMBE'S QUARTET Mean of x => 9 Sample
variance of x => 11 Mean of y => 7.50 Sample variance of y => 4.125 Correlation => 0.816 Linear regression => y = 3.00 + 0.500x
PERCENTILES PERCENTILES P50, P90, P95, P99 P50, P90, P95, P99
MONITOR MONITOR P99.9 OR P99.95 P99.9 OR P99.95
THANKS THANKS
DROGA.DEV DROGA.DEV
QUESTIONS? QUESTIONS?
"Have no fear of perfection - you'll never reach it."
― Salvador Dalí