[erlang-questions] Twoorl: an open source Twitter clone

Per Melin <>
Sun Jun 1 16:58:02 CEST 2008


2008/6/1 Joe Armstrong <>:
> A problem occurs if the original machine is dead - (ie the one that
> DNS said was the address associated
> with www.twoo.erl) - if the back-end machines are in pairs that
> monitor each other then I guess
> a gratuitous arp can fix the problem and reassign the the IP address
> of the failing machine to a
> new machine (which must now take over the role of the first machine)

This is a problem that every web site faces once it outgrows a single
server, and is usually solved with a dedicated off-the-shelf load
balancer (with a "high enough" MTBF) that detects and excludes failing
servers. These are turn-key solutions that work for the rest of the
web, including banks and others with higher demands than something
like Twitter has.

> The user connects to one of theses IP addresses and and requests data
> for "joe" - they are immediately redirected to the machine having
> joe's data.

Here is where Twitter goes wrong, I think. The data, and the
processing, is not distributed. All of it is in a single MySQL master
server, with two slaves for read access. It's easy to see how that
can't scale.



More information about the erlang-questions mailing list