Leveraging Elixir's hot code loading capabilities to modularize a monolithic app
Jun 21 2025
My “services startup” Alzo is an Elixir monolithic app that gets deployed with 1 instance per client.
In this post we will see how Elixir’s and the Erlang VM’s hot code loading capabilties help me build client-specific features while maintaining a coherent codebase and avoiding a microservices-like situation with cascading failures or complex testing situations.
If you come from outside Elixir/Erlang, the BEAM VM (Erlang’s virtual machine) lets you load compiled modules into a running system, and also provides the ability to compile files at runtime. This allows to either add code and behaviour at runtime, or even replace it, without stopping a running system.
I’ve wanted to write this one for a long time now, but had to face the difficulty of not writing everything I wanted to, because this post would be too long to be even considered for reading. I guess I really wore into Elixir and the BEAM with time and feel the desire to talk about it, showcase interesting parts of it… This syndrom seems widespread in our community.
1 instance per client
The rationale behind that choice comes from the following goals I set for myself :
I want Alzo to be able to easily run on-prem at clients that desire it
... continue reading