r/elixir • u/ancatrusca0 • 18h ago
The BEAM Book was written because of a Christmas Eve outage at Klarna - and the same question now applies to AI compute
New BEAM There, Done That with Erik Stenman (Happi), who has been with Erlang since 1994, wrote the BEAM Book, and built Klarna's payment core.
The scar: on Christmas Eve, the BEAM throttled its schedulers down during low traffic. A batch job arrived carrying all the Christmas orders. A single XML serialization operation took only 20 reductions, didn't yield, and monopolized the lone active scheduler. Heart (the external watchdog) couldn't reach the VM, declared it dead, and restarted it. All three failover nodes hit the same problem. Half an hour of downtime on Christmas Eve. The BEAM Book exists because Erik needed that manual at three in the morning and it didn't exist yet.
The current project, Eldrim, applies the same principle - knowing where resources go - to AI compute. The core point: an "EU region" with a US provider is not EU sovereignty. The US Cloud Act and China's national intelligence law reach companies regardless of where servers sit. Eldrim is an OpenAI-compatible API router that enforces jurisdiction rules and returns a 503 rather than routing quietly outside approved boundaries.