In this deep dive, we're going to unpack the reasons behind WhatsApp's intriguing choice: Why did they decide to use Erlang, a language originally designed for telecom systems, for one of the world's most popular messaging apps?
The Power of Erlang/OTP
When you think about messaging apps, telecom systems might be the last thing on your mind. Yet, that's precisely where Erlang shines, and it's the reason behind WhatsApp's stellar performance and reliability. Let's dissect this fascinating choice.
A Brief History of Erlang
Erlang was birthed in the labs of Ericsson, a Swedish multinational networking and telecommunications company. Its primary purpose was to develop fault-tolerant, scalable telecommunication systems. Given that phone networks require high availability (imagine your phone network being down for even a few minutes!), Erlang was designed to have hot-swapping abilities, meaning parts of a system could be updated or replaced without shutting the system down.
What's OTP and Why Does It Matter?
OTP stands for Open Telecom Platform. Despite its name suggesting a telecom-only application, it's a collection of middleware, libraries, and tools beneficial for building any large-scale, fault-tolerant applications. OTP components are predominantly written in Erlang, and they follow a set of design principles that promote robustness and scalability.
When we talk about Erlang/OTP, itβs a nod to how closely intertwined and complementary these two are. Together, they provide a robust framework for building distributed, fault-tolerant applications β exactly what a global messaging platform like WhatsApp needs.
Digging Deeper into Erlang's Architecture
At the heart of Erlang's prowess is the Erlang Runtime System (ERTS)
. The ERTS is a beacon of efficiency. It contains an emulator operating above the host's operating system. While this may sound standard, the magic is in the details. The kernel of ERTS offers critical low-level services, handling I/O and ensuring smooth communication between distributed Erlang nodes. Additionally, its standard library is a treasure trove of reusable modules, making development not only efficient but also consistent.

WhatsApp and Erlang: A Match Made in Heaven
Given the global scale of WhatsApp, with over 2 billion users sending messages, videos, and making calls daily, the platform demands near-perfect uptime. Any downtime could affect millions. Erlang, with its roots in telecom systems, offers just that: a promise of near-zero downtime, the ability to manage millions of simultaneous connections, and an architecture built for fault tolerance.
Moreover, the hot-swapping ability we mentioned earlier? It's a game-changer for WhatsApp. It means that the app can continuously evolve, with developers deploying new features or patches without interrupting the service. For end-users, it translates to a seamless experience without annoying outages.
WhatsApp's choice of Erlang/OTP isn't just about using a trendy technology; it's a testament to choosing the right tool for the job. It's a story of how a language designed for one domain, telecom, found its perfect match in a completely different arena, messaging apps, showcasing the timeless principles of scalability, fault-tolerance, and high availability.
Access all course materials today
The rest of this tutorial's contents are only available for premium members. Please explore your options at the link below.