Upgrading Code

Now that you’ve deployed your code to production, eventually you’ll need to update your production systems, whether you’re using Mix or releases. You may even have heard the Erlang VM is capable of performing hot code upgrades. This feature provides the ability to upgrade code live in production without bringing the system down. To do so, you need to build your releases first.

In practice, hot code upgrades are tricky, as they require developers to carefully maintain code and upgrade the state of all changed processes in all running applications. For example, imagine on v1.0 you have a process with a map with keys :first_name and :last_name as state. In v1.1, you decided to merge those keys under a new one called :name. You need ...

Get Adopting Elixir now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.