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
500
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
200
Simplifying systems with Elixir - Belgrade
sasajuric
3
490
Simplifying systems with Elixir
sasajuric
2
600
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
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
250
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
14
6.8k
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
1.3k
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.3k
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
170
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
220
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
280
関数型プログラミングのメリットって何だろう?
wanko_it
0
160
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
200
どこまでゆるくて許されるのか
tk3fftk
0
470
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
180
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.4k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.1k
Music & Morning Musume
bryan
47
7.3k
The agentic SEO stack - context over prompts
schlessera
0
840
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
30 Presentation Tips
portentint
PRO
1
350
Believing is Seeing
oripsolob
1
170
The browser strikes back
jonoalderson
0
1.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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