Erlang's Hot Code Swapping: WhatsApp's Zero-Downtime Updates
Erlang's unique hot code swapping feature allows WhatsApp to deploy updates and bug fixes to its live servers without interrupting service or disconnecting any of its billions of users, a critical capability for 24/7 availability.
The top 3
- How Erlang's BEAM Hot Swapping Works: Erlang's BEAM virtual machine uniquely allows old and new code versions of a module to coexist. Running processes gradually transition to the new code when making external calls, while the `code_change/3` callback function is vital for migrating process state to maintain continuity during updates.
- Erlang's Telecom Roots: 99.999% Uptime Goal: Erlang was initially developed by Ericsson in 1986 for telecommunication systems, where uninterrupted service is critical. Its hot code swapping feature was a fundamental design principle to enable 'five-nines' (99.999%) availability, ensuring systems could be updated without dropping calls or services.
- Beyond WhatsApp: Top Systems Using Erlang Hot Swaps: WhatsApp is not alone in leveraging Erlang's hot code swapping for extreme uptime. Ericsson's GPRS/3G/4G/5G infrastructure, Facebook Chat (handling over 100 million users), Discord (patching >100 million processes in minutes), Nintendo Switch's messaging system, and Cisco's networking devices all rely on this capability for critical, zero-downtime updates.
Sources
Open the full topic