Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
530
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
120
JVM Workshop
jkubrynski
1
200
Engineering architecture
jkubrynski
0
810
Case study of the good enough architecture
jkubrynski
0
440
JPA - Beyond Copy-Paste
jkubrynski
3
1.6k
Microservices - The Naked Truth Of The Maintainability
jkubrynski
1
730
Other Decks in Programming
See All in Programming
Rails Girls Sapporo 2ndの裏側―準備の日々から見えた、私が得たもの / SAPPORO ENGINEER BASE #11
lemonade_37
2
190
Feature Flags Suck! - KubeCon Atlanta 2025
phodgson
1
190
イベントストーミングのはじめかた / Getting Started with Event Storming
nrslib
1
770
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
5
2.7k
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
4
190
All(?) About Point Sets
hole
0
230
ソフトウェア設計の課題・原則・実践技法
masuda220
PRO
24
19k
チーム開発の “地ならし"
konifar
8
6.4k
Web エンジニアが JavaScript で AI Agent を作る / JSConf JP 2025 sponsor session
izumin5210
4
2.1k
競馬で学ぶ機械学習の基本と実践 / Machine Learning with Horse Racing
shoheimitani
14
14k
なぜ強調表示できず ** が表示されるのか — Perlで始まったMarkdownの歴史と日本語文書における課題
kwahiro
12
7.4k
WebRTC と Rust と8K 60fps
tnoho
2
980
Featured
See All Featured
Being A Developer After 40
akosma
91
590k
Site-Speed That Sticks
csswizardry
13
970
Bash Introduction
62gerente
615
210k
A better future with KSS
kneath
239
18k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
Navigating Team Friction
lara
190
16k
A Tale of Four Properties
chriscoyier
162
23k
Facilitating Awesome Meetings
lara
57
6.6k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Designing Experiences People Love
moore
142
24k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
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í