WhatsApp's Peak Concurrency: 2 Million Connections/Server

WhatsApp achieved a record of over 2 million simultaneous connections per server using Erlang/BEAM, enabling them to serve hundreds of millions of users with a remarkably small engineering team.

The top 3

  1. Discord's BEAM Concurrency: 12 Million Users: Discord achieved over 12 million concurrent users and 26 million WebSocket events per second using Elixir and the Erlang VM, demonstrating similar extreme scalability to WhatsApp with its lightweight processes.
  2. BEAM Processes: 1000x Memory Efficiency vs. OS Threads: Erlang's BEAM processes are significantly more memory-efficient, typically using only 2-3 KB per process, which is up to 1,000 times lighter than the 1-2 MB required by traditional OS threads, enabling millions of concurrent connections on a single server.
  3. Erlang's "Let It Crash" for 24/7 Stability: WhatsApp's ability to maintain high availability with millions of connections is significantly due to Erlang's 'let it crash' philosophy and OTP supervision trees, which automatically detect and restart failing processes in microseconds, preventing system-wide outages.

Sources

Open the full topic