The BEAM Book, Second Edition

Understanding the Erlang Runtime System

The BEAM Book, Second Edition
Book

What actually happens inside the Erlang Runtime System, updated for Erlang/OTP 29.

Second Edition

Release date: 1 October 2026

  • Foreword by Francesco Cesarini
  • 525 pages
  • Paperback, hardcover, and eBook

Updated for Erlang/OTP 29. See the second-edition eBook and event offers below.

Buy the second edition

eBook, wherever you are

PDF + EPUB. Digital delivery by email. No physical book. The book is in English.

Get the second edition in PDF and EPUB for €10, directly from Happi Hacking. Download links are emailed after payment.

PDF + EPUB — €10. Includes applicable VAT.

Signed copies at events

Event pickup only. No shipping. Buy while you are at Erik’s book table, then show your payment confirmation to collect your signed copy. The PDF and EPUB will be sent to your email.

Physical sales open only when copies are available at the table. These offers are not advance reservations.

What Actually Happens Inside the Erlang Runtime System

The BEAM virtual machine is one of the most capable pieces of systems software ever built. It runs millions of independent activities, survives failure, replaces code while systems are running, and keeps going under pressure.

The BEAM Book explains how that machinery actually works.

Written by Erik Stenman, the second edition is a substantial technical reference to the Erlang Runtime System. It is updated for Erlang/OTP 29 and expanded with new material on the BeamAsm JIT compiler, compiler internals, BEAM instructions, loading, scheduling, memory, term storage, tracing, profiling, and operations.

“The best book on the BEAM.”

Amos King, EEF Board

“Essential to learn Erlang VM internals.”

Kenji Rikitake

What Is New in the Second Edition?

The second edition preserves the original path through the runtime and extends it from source code and compiler passes through BEAM instructions, loading, interpretation, native execution, scheduling, memory management and operation.

It includes:

  • A new chapter on the BeamAsm JIT compiler
  • Updated coverage of compiler passes, SSA, type analysis, and alias analysis
  • Expanded treatment of processes, signals, and message passing
  • Dirty schedulers, scheduler queues, and load balancing
  • Memory allocators, process memory, and destructive updates
  • A new chapter on ETS and persistent terms
  • Modern socket and I/O internals
  • Updated distribution internals and backpressure
  • New material on tracing, profiling, and native coverage
  • Practical debugging and runtime operations
  • OTP 29 examples, version notes, and implementation references
  • New appendices covering ERTS builds, BEAM instructions, and third-party licences

What remains from the first edition?

The second edition keeps the core of the original book. The chapters on processes, the Erlang type system, BEAM, modules and BEAM files, instructions, calls, loading, scheduling, memory, garbage collection, I/O, distribution, interoperability, operations, debugging, tracing, testing and profiling are all still part of the book.

They have been revised, corrected and expanded rather than discarded. The explanations, examples and implementation details have been brought forward to current Erlang/OTP releases, while the historical material that helps explain how the runtime evolved has been retained where it remains useful.

The second edition is therefore both a continuation and a deeper version of the first edition. It preserves the original path through the runtime and extends it with the parts that were missing, especially the BeamAsm JIT, modern compiler internals, term storage, current scheduler and memory behaviour, and more practical operational guidance.

If you started with the first edition, the second edition gives you the same foundation with the missing machinery filled in. If you are new to the book, it is the complete current reference.

From Source Code to a Running System

The book connects the layers that developers usually encounter separately. It follows code through compilation and loading, then shows how execution, scheduling, memory, communication, and observability fit together inside ERTS.

The first edition remains available to read online and buy as a paperback. Those links are for the first edition. See the second-edition offers above for direct purchases.

Licensing and Open Access

The first edition remains free to read online. The second edition will be released under the Creative Commons Attribution 4.0 licence when the third edition is published.