…need more than one instances, obv. AZes too. enough to absolb failures and resultant load spikes
erld: makes the erlang vm seem like a unix daemon, supports heartbeats
deployment: either upgrade existing server instances, or deploy all new ones. new: easy to rollback to still-running old ones. makes sure deployment is repeatable.
replaced redis w/custom server, was simpler and faster (but redis driver for erlang is just really slow)
AWS Lambda is interesting…
Joseph Blomstedt: Data Structures
bt: erlang tree data structure
orddict: tree structure with leaves holding up to 3 values
bt_nif: slow on 10 mil entries, but it can do it!
Iñaki Garay: Training
community is small; finding experienced erlangers is hard
right candidates; apprenticeship; clear guidelines; good tooling
having a toy project is very helpful. use as learning sandbox… fundamental principles, concurrency, OTP, other libraries, up to deployment
Louis-Philippe Gauthier: Debugging Complex Systems
need to understand the system… stack: OS, VM, application, protocols, external services… tools (experiment begore you need them!)… requirements: is this really a bug?
reproduce the bug. find conditions, try locally, try prod
collect data… see if it’s a known bug. filter out data noise.
process of elimination / divide and conquer. macro observations: all servers affected? data centers? external services? (if multiple bugs, one might be hiding another…)
change 1 thing at a time, don’t take shortcuts. keep audit trail: postmortems, collaboration, learning.
tip: deploy different branches to different boxes!
verify your assumptions! code deployed? VM version? configs? tools lying? (check your audit trail…)
take a step back. sleep on it, ask co-worker, ask expert
validate fix. found root cause? maybe roll out slowly.
regression tests are good
tools
erlang’s shell, can log in remotely
ets:i()? can also easily spin up interval checks for process info… (observer:start()…)