Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Erlang Hot Code Loading not widely used?

Tags:

erlang

I just saw this 2012 video from LinuxConf.au about Erlang in production.

There's a part on the video where Bernard says no big Erlang projects use Hot Code Loading apart from Ericsson, because it's really hard to guarantee things will work. It's around minute 29.

Is that still true? Are there tools to help test a hot code load or or make it easier nowadays?

like image 435
Juliano Avatar asked Dec 08 '22 02:12

Juliano


1 Answers

This is not true. Every Erlang user uses hot code loading to his advantage in one way or another -- whether it is for development, testing, troubleshooting, one-off fixes, or full scale deployments. This is one of the major Erlang advantages. Rather unique too.

For example, WhatsApp, one of the biggest Erlang users, relies on hot code loading for almost all code pushes.

I have personally worked with hot code loading in scenarios where each change was well understood and often performed by the same person who made the change. It works extremely well and good engineers don't have any problems doing this. Speaking of tools, loading modules one by one from Erlang shell using l(...). or all at once using l(). (see here) works just fine. Some prefer release-based tools like relx.

Others, like Ericsson, use enterprise-style deployments with hot code loading after rigorous testing of clear-cut releases and patches. The goal here is to upgrade without using spare capacity and special procedures for draining and shifting load. Operationally this may be simpler and more efficient than restarts, but testing can be more expensive.

like image 116
alavrik Avatar answered Dec 19 '22 08:12

alavrik