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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.