Skip to main contentSkip to navigationSkip to navigation

Average Twitter user has 126 followers, and only 20% of users go via website

This article is more than 14 years old
Got 127 followers on Twitter? Congratulations - you're above average! And do you want to guess when its busiest time was? (Hint: not the Iran election...)

Here are some did-you-knows to drop about Twitter:

-the average user has 126 followers;

-only 20% of its traffic comes through the Twitter website; the other 80% (logically) comes from third-party programs on smartphones or computers. So if you're looking at Twitter stats on your website, you're probably underestimating that source of traffic by a factor of five;

-an early peak test of the service came during President Obama's inauguration in January, when more than 300 tweets per second were being added to the message queue.

These party factoids come courtesy of Evan Weaver, Twitter's lead engineer in its services team, who gave a talk at QCon 2009 to explain the architecture of the system - which started out as a sort of small content management system, but has morphed into a "messaging system" of sorts.

Weaver's job is primarily about optimisation and scalability, and that's been more necessary than ever with the abrupt growth of the site in the past year.

The post itself is a good read if you're into the problems of how to build a large backend system that will update in near-real time while serving millions of users.

Most of the tools used by Twitter are open source. The stack is made up of Rails for the front side, C, Scala and Java for the middle business layer, and MySQL for storing data. Everything is kept in RAM and the database is just a backup. The Rails front end handles rendering, cache composition, DB querying and synchronous inserts. This front end mostly glues together several client services, many written in C: MySQL client, Memcached client, a JSON one, and others.

("Most" of the tools? Which ones aren't?)

You can also see the slides at Weaver's own site. The "Obamamania" slide is No.19 - and is quite dramatic - and if you look at slide 42 and magnify it like mad you'll see all the C tools the company uses.

The other interesting things? Twitter pretty much lives in RAM - the database is "just a backend" for, well, when the RAM doesn't hold what is wanted. But because generally tweets have a short life, the database hardly ever needs to be queried - it's only stuff like old tweets, searches, "conversations" that are needed for those, and you can do that asynchronously.

All in all, though - aside from the interesting way of how to be above average - it's an interesting insight into what's needed to run such a big system.

The next question: can it keep growing that fast? And the second: can someone please figure out a way for it to make money so it won't vanish?

Comments (…)

Sign in or create your Guardian account to join the discussion

Most viewed

Most viewed