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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Saša Jurić
April 23, 2015
Programming
500
5
Share
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
200
Simplifying systems with Elixir - Belgrade
sasajuric
3
480
Simplifying systems with Elixir
sasajuric
2
600
Metagrokking Elixir
sasajuric
4
320
Solid Ground
sasajuric
15
1.3k
Solid Ground
sasajuric
3
930
Elixir - valentine edition
sasajuric
0
150
What's the fuss about Phoenix?
sasajuric
2
1.1k
Phoenix
sasajuric
1
260
Other Decks in Programming
See All in Programming
SkillsをS3 Filesに置く時のあれこれ
watany
4
1.8k
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
1
960
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
130
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
300
Migrations : C'est une question d'hygiène !
vinceamstoutz
0
1.8k
AgentCore Optimizationを始めよう!
licux
4
280
関係性から理解する"同一性"の型用語たち
pvcresin
2
520
Agent Skills を社内で育てる仕組み作り
jackchuka
1
2.4k
Oxlintはいかにしてtsgolintのlint ruleを呼び出しているのか
syumai
1
480
1人1案件のプロダクトエンジニア時代に、"プロセス監督"としてチャレンジしたこと
non0113
0
300
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
290
Swiftのレキシカルスコープ管理
kntkymt
0
190
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Raft: Consensus for Rubyists
vanstee
141
7.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
The agentic SEO stack - context over prompts
schlessera
0
780
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
54k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
150
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Color Theory Basics | Prateek | Gurzu
gurzu
0
310
Context Engineering - Making Every Token Count
addyosmani
9
900
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
370
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
190
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