Supervision tree on a monitor with a red node at the top cascading downward, ceramic rabbit lying tipped over on the desk

GenServer the "rabbit hole" — Part 2: The Silent Cascade

Continuation of GenServer the “rabbit hole”. If you haven’t read it yet, I recommend going there first — we’ll start from the same genserver_study project and the same concepts of mailbox, supervisor and max_restarts. In the previous article we explored how a “misbehaving” GenServer can shut down the whole supervision tree when it bursts the supervisor’s max_restarts. We showed how messages are lost in the mailbox and how “Let it crash” isn’t exactly a blank check to let processes break randomly. ...

May 16, 2026 · 14 min · Daniel Lima
Late-night desk lit by a purple terminal running iex, with a ceramic rabbit beside the keyboard

GenServer — the "rabbit hole"

When we explore Elixir’s strengths as a programming language, two stand out compared to other languages on the market: 🚀 3. Concurrency and Scalability Uses actors (processes) for concurrency (each with its own memory and message queue). Millions of processes can run concurrently with low overhead. Built-in tools for distribution across multiple nodes. 🛠 4. Fault-Tolerance and Supervision Trees “Let it crash” philosophy: Failures are expected and isolated. Supervision trees: Automatically restart failing processes, making systems self-healing and resilient. GenServer is an abstraction over the Erlang VM’s process model, shipped by the language core, that connects directly to Elixir’s concurrency and supervision tree features. Because it’s a common pillar in the architecture of Elixir systems, and because it’s covered “prematurely” in the official docs (Client-server communication, OTP Concurrency), newcomers tend to model their first Elixir solutions using the abstraction provided by the GenServer module. It takes a while before the official doc gets to its first disclaimer for the unaware: When (not) to use a GenServer. ...

July 19, 2025 · 14 min · Daniel Lima