ConfigsJul 13, 2026·3 min read

Erlang/OTP — Battle-Tested Language for Fault-Tolerant Distributed Systems

Erlang/OTP is a functional programming language and runtime designed for building highly concurrent, fault-tolerant, and distributed systems with hot code upgrades.

Agent ready

Ready-to-run agent install

This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.

Native · 98/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Single
Trust
Trust: Established
Entrypoint
Erlang/OTP Overview
Direct install command
npx -y tokrepo@latest install fb99e834-7ef7-11f1-9bc6-00163e2b0d79 --target codex

Run after dry-run confirms the install plan.

Introduction

Erlang is a functional programming language created at Ericsson in the 1980s for building telecom-grade systems. Together with OTP (Open Telecom Platform), it provides a framework for building applications that must run continuously with minimal downtime. Erlang powers systems at WhatsApp, Discord, and RabbitMQ.

What Erlang/OTP Does

  • Runs millions of lightweight processes on the BEAM virtual machine
  • Provides built-in fault tolerance through supervisor trees and process isolation
  • Supports hot code swapping for upgrades without stopping the system
  • Enables transparent distribution across multiple nodes
  • Includes OTP behaviors (gen_server, gen_statem, supervisor) for common patterns

Architecture Overview

Erlang runs on the BEAM virtual machine, which schedules lightweight processes across CPU cores using preemptive scheduling. Each process has its own heap and communicates via asynchronous message passing. OTP provides standardized abstractions: gen_server for client-server patterns, supervisors for automatic restart strategies, and applications for packaging releases.

Self-Hosting & Configuration

  • Install via package managers or use kerl/asdf for version management
  • Configure releases with rebar3 or mix (for Elixir interop)
  • Set VM flags in vm.args for memory limits, scheduler count, and node naming
  • Use sys.config for application-level environment variables
  • Deploy as self-contained releases with rebar3 release

Key Features

  • Lightweight processes (millions per node) with per-process garbage collection
  • "Let it crash" philosophy with automatic process restart via supervisors
  • Hot code loading for live system upgrades
  • Pattern matching and immutable data by default
  • Battle-tested in telecom, messaging, and financial systems for decades

Comparison with Similar Tools

  • Elixir — Elixir runs on the BEAM and adds modern syntax; Erlang is the original with deeper OTP integration
  • Go — Go has goroutines but lacks built-in supervision trees and hot code swapping
  • Rust — Rust focuses on memory safety; Erlang focuses on fault tolerance and uptime
  • Akka (Scala/Java) — Akka implements the actor model on the JVM but lacks BEAM's per-process isolation
  • Node.js — Node is single-threaded with async IO; Erlang is truly concurrent with preemptive scheduling

FAQ

Q: Is Erlang still relevant today? A: Yes. Erlang powers WhatsApp, RabbitMQ, CouchDB, and many telecom systems. Its concurrency model remains unmatched for certain workloads.

Q: What is the relationship between Erlang and Elixir? A: Elixir is a separate language that compiles to BEAM bytecode and can call Erlang libraries directly. They share the same runtime.

Q: Can Erlang handle millions of connections? A: Yes. The BEAM VM was designed for this. WhatsApp reportedly handled two million connections per server using Erlang.

Q: How does hot code swapping work? A: The BEAM can load a new version of a module while the old version is still running. Active processes migrate to the new code on their next function call.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets