Erlang / Erlang Advanced Interview questions
Explain the internal working of a relup-based hot upgrade?
A relup (release upgrade) file is a generated script describing exactly how to move a running
system from one release version to another without a restart: which applications to stop/start, which modules
to load, in what order, and which processes need their internal state transformed via
code_change/3.
flowchart TD
A[release_handler:install_release] --> B[Suspend affected processes]
B --> C[Load new module code]
C --> D[Call code_change/3 on running gen_server state]
D --> E[Resume processes with upgraded code + transformed state]
E --> F{Upgrade successful?}
F -->|No| G[Roll back using matching downgrade instructions]
release_handler:install_release/1 reads the relup script and executes its instructions in
order, pausing affected gen_servers just long enough to swap in new code and let
code_change/3 reshape their existing state to match the new version's expectations. Because the
relup also contains the reverse (downgrade) instructions, a failed upgrade can be rolled back to the previous
known-good release rather than leaving the system in a broken intermediate state.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
