Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
500
Simplifying systems with Elixir
sasajuric
2
630
Metagrokking Elixir
sasajuric
4
350
Solid Ground
sasajuric
15
1.3k
Solid Ground
sasajuric
3
950
Elixir - valentine edition
sasajuric
0
160
What's the fuss about Phoenix?
sasajuric
2
1.2k
Phoenix
sasajuric
1
310
Other Decks in Programming
See All in Programming
dotNET_vulnclicker_intro.pdf
deka_morita
0
150
sbt 2.0: takeoff
eed3si9n
0
170
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
200
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
780
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
270
AmebaブログはKMPから卒業します
kmars0605
0
220
ActionController meets Protocol Buffers
sorah
0
670
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
410
Workers Cache を知る
syumai
0
370
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
オーケストレーション記述言語 Katari
yukikurage
0
170
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
160
Featured
See All Featured
Claude Code のすすめ
schroneko
67
230k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Music & Morning Musume
bryan
48
7.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
630
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
790
Side Projects
sachag
456
43k
Embracing the Ebb and Flow
colly
88
5.2k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
4 Signs Your Business is Dying
shpigford
187
23k
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