BEAM's 'Let It Crash': The Fault Tolerance Edge

Erlang's BEAM virtual machine famously employs a "let it crash" philosophy, where instead of preventing all errors, it uses supervisor trees to automatically detect and restart failing processes, ensuring system uptime and resilience for critical applications like telecommunication systems.

The top 3

  1. Joe Armstrong's "Let It Crash" Origin: Coined by Erlang creator Joe Armstrong, the "Let It Crash" philosophy advocates for allowing individual processes to fail, relying on separate "supervisors" to detect and recover from errors, rather than extensive defensive programming within each component.
  2. BEAM's Supervision Trees: The Recovery Mechanism: The BEAM virtual machine implements "Let It Crash" via hierarchical "supervision trees," where supervisor processes monitor and restart failed worker processes or even other supervisors, using strategies like 'one_for_one' or 'one_for_all' to maintain system stability.
  3. Achieving 99.999999% Uptime: Erlang's Real-World Edge: The "Let It Crash" approach, combined with BEAM's fault isolation and supervision, allows systems built with Erlang/Elixir (like Ericsson telecom switches and WhatsApp) to achieve extremely high uptimes, often cited as 99.9999% or more, by preventing local failures from cascading.

Sources

Open the full topic