3 ms·
Kill at any time is dangerous for stateful Erlang / Elixir workloads. But there are several patterns: 1. Some process group libraries can handle graceful shutd
by namelosw 6y ago
Kill at any time is dangerous for stateful Erlang / Elixir workloads. But there are several patterns:
1. Some process group libraries can handle graceful shutdown, which migrates the processes to other nodes. When you kill one of the nodes, it's process goes to other nodes in like tens of seconds.
2. Invent some virtual actor pattern like Microsoft Orleans.
3. Just backup processes states to external storage. Even not for shutting down nodes scenarios, people still tend to backup process state to ETS or stateful processes so that stateless processes can crash-then-revive without troubles.