Where is Erlang used and why? [closed]

I would like to know a list of the most common application/websites/solutions where Erlang is used, successfully or not.

Explaining why it is used into a specific solution instead of others programming languages would be very much appreciated, too.

Listing BAD Erlang case studies (cases in which Erlang is misused) it would be interesting, as well.


From Programming Erlang:

alt text http://bks8.books.google.com/books?id=Qr_WuvfTSpEC&printsec=frontcover&img=1&zoom=5&sig=ACfU3U2F4YY4KqO0vCuZ4WEZjdE2yFFvvg

Many companies are using Erlang in their production systems:

Amazon uses Erlang to implement SimpleDB, providing database services as a part of the Amazon Elastic Compute Cloud (EC2).

Yahoo! uses it in its social bookmarking service, Delicious, which has more than 5 million users and 150 million bookmarked URLs.

Facebook uses Erlang to power the backend of its chat service, handling more than 100 million active users.

WhatsApp uses Erlang to run messaging servers, achieving up to 2 million connected users per server.

T-Mobile uses Erlang in its SMS and authentication systems.

Motorola is using Erlang in call processing products in the public-safety industry.

Ericsson uses Erlang in its support nodes, used in GPRS and 3G mobile networks worldwide.


The most popular open source Erlang applications include the following:

• The 3D subdivision modeler Wings 3D, used to model and texture polygon meshes.

• The Ejabberd system, which provides an Extensible Messaging and Presence Protocol (XMPP) based instant messaging (IM) application server.

• The CouchDB “schema-less” document-oriented database, providing scalability across multicore and multiserver clusters.

• The MochiWeb library that provides support for building lightweight HTTP servers. It is used to power services such as MochiBot and MochiAds, which serve dynamically generated content to millions of viewers daily.

RabbitMQ, an AMQP messaging protocol implementation. AMQP is an emerging standard for high-performance enterprise messaging.


ejabberd is one of the most well know erlang application and the one I learnt erlang with.

I think it's the one of most interesting project for learning erlang because it is really building on erlang's strength. (However some will argue that it's not OTP, but don't worry there's still a trove of great code inside...)

Why ?

An XMPP server (like ejabberd) can be seen as a high level router, routing messages between end users. Of course there are other features, but this is the most important aspect of an instant messaging server. It has to route many messages simultaneously, and handle many a lot of TCP/IP connections.

So we have 2 features:

  • handle many connections
  • route messages given some aspects of the message

These are examples where erlang shines.

handle many connections

It is very easy to build scalable non-blocking TCP/IP servers with erlang. In fact, it was designed to solve this problem. And given it can spawn hundreds of thousand of processes (and not threads, it's a share-nothing approach, which is simpler to design), ejabberd is designed as a set of erlang processes (which can be distributed over several servers) :

  • client connection process
  • router process
  • chatroom process
  • server to server processes

All of them exchanging messages.

route messages given some aspects of the message

Another very lovable feature of erlang is pattern matching. It is used throughout the language.

For instance, in the following :

access(moderator, _Config)->  rw;
access(participant, _Config)->  rw;
access(visitor, #config{type="public"})->  r;
access(visitor, #config{type="public_rw"})->  rw;
access(_User,_Config)->  none.

That's 5 different versions of the access function. Erlang will select the most appropriate version given the arguments received. (Config is a structure of type #config which has a type attribute).

That means it is very easy and much clearer than chaining if/else or switch/case to make business rules.

To wrap up

Writing scalable servers, that's the whole point of erlang. Everything is designed it making this easy. On the two previous features, I'd add :

  • hot code upgrade
  • mnesia, distributed relational database (included in the base distribution)
  • mochiweb, on which most http erlang servers are built on
  • binary support (decoding and encoding binary protocol easy as ever)
  • a great community with great open source projects (ejabberd, couchdb but also webmachine, riak and a slew of library very easy to embed)

Fewer LOCs

There is also this article from Richard Jones. He rewrote an application from C++ to erlang: 75% fewer lines in erlang.