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
High Availability
Search
Saša Jurić
April 23, 2015
Programming
510
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
High Availability
ElixirConf Europe
Saša Jurić
April 23, 2015
More Decks by Saša Jurić
See All by Saša Jurić
Such Great Heights, Code BEAM Lite, Amsterdam 2018
sasajuric
0
210
Simplifying systems with Elixir - Belgrade
sasajuric
3
490
Simplifying systems with Elixir
sasajuric
2
610
Metagrokking Elixir
sasajuric
4
330
Solid Ground
sasajuric
15
1.3k
Solid Ground
sasajuric
3
940
Elixir - valentine edition
sasajuric
0
150
What's the fuss about Phoenix?
sasajuric
2
1.2k
Phoenix
sasajuric
1
270
Other Decks in Programming
See All in Programming
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
280
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
180
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
9
4.8k
AI時代に設計が 最大の生産性レバーになる 意図駆動開発とデータを消さない設計|Don't Delete Your Data or Your Intent — Design as the Deepest Lever in the AI Era
tomohisa
1
610
FDEが実現するAI駆動経営の現在地
gonta
2
260
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
510
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
330
「人を評価する AI」の設計と実装
ryoyanara
0
130
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
170
継続モナドとリアクティブプログラミング
yukikurage
3
680
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
1
1.4k
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
390
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
141
7.6k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
430
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
66
57k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
950
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
690
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
660
Mobile First: as difficult as doing things right
swwweet
225
10k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Amusing Abliteration
ianozsvald
1
240
Code Review Best Practice
trishagee
74
20k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
440
Believing is Seeing
oripsolob
1
180
Transcript
iex(1)> high_availability @sasajuric aircloak.com
Erlang (the language) Elixir LFE Erlang VM (BEAM)
highly_available ≈ works_almost_always
optional?(highly_available) # false
easy?(highly_available) # false
None
highly_available do # the code here magically works end #doesntworklikethat
fault-tolerance scalability + responsiveness = high availability
A B D E F C
send(pid, message) A B message = receive ...
def loop(state) do receive do message -> new_state = handle(state,
message) loop(new_state) end end
bank account balance {:deposit, amount} {:withdraw, amount} :balance amount
OS process or thread Erlang process
db connection background job request handler state request handler request
handler request handler request handler request handler state state state background job background job background job db connection db connection db connection
A B C D E F
A exit message B C D E F
supervisor worker worker
S S S W W S W W W S
W W
scheduler scheduler scheduler scheduler CPU CPU CPU CPU VM
VM VM VM VM VM
VM send(pid, message) VM 1 send(pid, message) VM 2
shared-nothing concurrency process crash propagation + some VM magic =
fault tolerance scalability responsiveness
None
3rd party data source transform data push server browsers bets
validation
Data transformation 1.Receive TCP stream" 2.Assemble XML messages" 3.Update the
model" 4.Store to database" 5.Serialize the model" 6.Dispatch
receive stream assemble messages update model store to database serialize
data dispatch
receive stream assemble messages update model store to database serialize
data dispatch message 6 message 5 message 4 message 3 message 2 message 1
receive stream assemble messages update model store to database serialize
data dispatch
storing to database queuing bet odds storing bet odds
match 1 match 3 match 2
update model serialize data dispatch match 1 match 3 match
2
None
None
None
None
None