Use of Erlang in WhatsApp

Summary

WhatsApp's backend architecture provides a strong testament to Erlang's scalability, effectively challenging perceptions of it as a niche language. A key developer, initially unfamiliar with Erlang, rapidly became proficient, leveraging its features for robust VM, cluster infrastructure, and Mnesia database implementations. This Erlang-powered system efficiently manages over 2 million long connections and processes billions of messages daily, demonstrating its capability to resolve complex issues related to data scale, memory management, and concurrency. WhatsApp's success in supporting 100 million daily active users underscores Erlang's potential for building high-performance, distributed messaging platforms.

After many years, people are still discussing whether Erlang is a small language. People have all sorts of doubt about it, but with the appearance of WhatsApp, we may change our mind.

What is WhatsApp, from its official website:

WhatsApp Messenger is a cross-platform mobile messaging app which allows you to exchange messages without having to pay for SMS.

The more funny thing is the main developer of WhatsApp Rick Reed worked in Yahoo and SGI before he joined WhatsApp and he didn't have any knowledge about Erlang at that time:

Joined WhatsApp in 2011,New to Erlang

Later in another article:

Joined server team at WhatsApp in 2011,No prior Erlang experience

But after 2 to 3 years, he becomes the expert in Erlang. From his two PPTs, we can find that he exposed all the features of Erlang, he used best VM, cluster infrastructure, database mmesia and resolved many issues about data scale, memory pool and locks.

From some data below, we hope those who are still doubting Erlang can rethink about it.

The backend architecture is based on Erlang:

wa1

It has a push server can handle over 2 million long connections:

wa4

The scale of mmesia in WhatsApp:

wa2

Production system data:

wa3

Messages per second:

wa6

This company has a daily active user of 100 million. These users send messages to families and friends. Evey minute user spends on WhatsApp allows them to spend one less minute on Facebook. The last time WhatsApp updated its usage data is on October,2011. The messages sent per day at that time was 1 billion.

This app developed using Erlang has great potential and it has its own target. It wants to be one great mobile messaging system working on all mobile phones.

Source : http://blog.yufeng.info/archives/2615

ARCHITECTURE ERLANG WHATSAPP

  RELATED

  COMMENTS

0

No comment for this article.