Why Can't Twitter Scale? Blaine Cook Tries To Explain

|

blaine-cook.jpgToday, Blaine Cook, formerly Twitter’s chief architect, writes his first blog post since leaving Twitter. It certainly seems like he has some stuff to get off his chest. (Not true, says Blaine - see comment below).

The gist of the piece is that languages don’t scale, architectures do. It seems clear why Blaine might want to say something about scaling, since it is clearly the number one issue at Twitter. And he did take some heat for the problems there. And in some corners of the Web, Ruby, the language that Twitter runs on, has taken even more heat.

Blaine's arugment: Scaling is fundamentally about the ability of a system to easily support many servers. So something is scalable if you can easily start with one server and go easily to 100, 1000, or 10,000 servers and get performance improvement commensurate with the increase in resources.

When people talk about languages scaling, this is silly, because it is really the architecture that determines the scalability. One language may be slower than another, but this will not affect the ability of the system to add more servers.

Typically one language could be two or three, or even ten times slower. But all this would mean in a highly scalable system is that you would need two or three or ten times the number of servers to handle a given load. Servers aren't free (just ask Facebook), but a well-capitalized company can certainly afford them.

The problem comes when your architecture is such that you can’t just add more servers. While Blaine does not discuss this, the primary reason things don’t scale has to do more with the cost of data access. Databases are almost always your bottleneck, because all your data typically needs to be stored in some central repository.

So how you architect your data storage and access will determine your scalability. For example, do you use RAM based caching like memcached to improve performance and limit the need to read the database? If so, is your caching architecture good enough to limit most reads from the database, or just a few? These are the kinds of architectural decisions that will determine system performance.

In Twitter's case, there is zero chance that the problems there are in any way related to their language. It is likely that there are architectural challenges which come from the fact that it is very hard to cache a Twitter data request since no two people ever get the same data. And even for a given user, the data requests change quickly since users are always receiving tweets. This is a hard, though not unsolvable problem that requires a very specialized caching architecture. Eran Hammer-Lahav, has done some interesting work in this area and talks about it in an extensive blog post.

The bottom line is languages don’t kill scaling, programmers do. As such, Blaine's piece, while sounding a bit defiant, might really be read more like a mea culpa. Though, to be fair, despite all the chatter and criticism, scaling Twitter is indeed a non-trivial problem.

SAI Contributor Hank Williams is a New York-based entrepreneur. He writes Why Does Everything Suck? Exploring the tech marketplace from 10,000 feet.

See Also: Lead Architect Blaine Cook Out At Twitter

Twitter Turmoil Not Finished: Engineering VP Lee Mighdoll Out



< Prev. Story
Next Story >

27 Comments

Blaine Cook (URL) said:
Not so much with the angst releasing. My post was in response to Ola Bini's post, which was in response to recent hemming and hawing in the Ruby / Java / Scala / etc community about whether or not languages are scalable. Also, note that I post to my blog less than once per month, so that it's my first since I left Twitter isn't exactly surprising.

Ian Lamont (URL) said:
"In Twitter's case, there is zero chance that the problems there are in any way related to their language."

So, in other words, Twitter could be written in Java, C++, Basic, or whatever, without any impact on its ability to scale?

You sure about that?

Peter Kafka said:
Hi Blaine. Your angst-lack has been duly noted. See first graf. pk

Owen Byrne (URL) said:
I don't think anybody has said that Ruby doesn't scale. What they have said is "Ruby on Rails" doesn't scale. Ruby may be a language, but Rails is an architecture.

Dizzle said:
Are they employing hadoop or anything like that. this reminds me of the top 10 excuses engineers make... mainly to blame the other guy.

Blaine Cook (URL) said:
@ian: see my post. In short, yes, you could have written Twitter in tcsh and scaled it. It would have been extremely expensive and painful, but certainly not impossible. Now, whether or not tcsh or Ruby or any other language makes or made the most sense -- that's a more complicated question, and one you need to make taking all the factors into account.

@pk: thanks! :-)

@owen: Follow the link from my post to Ola's post, and the threads that lead there. People have been claiming recently that "Ruby" doesn't scale.

@dizzle: I don't think I'm blaming anyone. I've been really up-front about the challenges we faced at Twitter and the mistakes we made. I can't talk about specifics because I signed an NDA, but I'll be the last to claim we did everything right. What I will claim is that the language choice had very little to do with it, and suggesting that some languages are inherently more scalable is just wrong.

James (URL) said:
Finally, an enlightening article for the technonoobs on techcrunch who, at the first mention of scaling issues and rails, say that Rails does not scale.

We're scaling fine at Scribd, and we've got the largest web traffic for any rails site.

Alice said:
James: You don't have the largest web traffic. You have the largest unique user count, which is different. Twitter turns 6x the pages as you not counting the API.

Vincent Burns said:
I can agree/disagree with the idea that languages do not scale, architectures do.

If twitter was implemented in erlang, you get the OTP libraries that make scalability damn easy. Then you also have the distributed database mnesia with it. These are all standard librarys for erlang.

Erlang is a language designed for high-reliability and soft-realtime applications, this means that you will always know latency of a request. For example, unlike most languages with a GC it wont all the sudden take longer on some requests because the GC is running.

beat that ruby!

cheap rf gold (URL) said:
The Bellato enter the war as the least physically capable and yet given their cheap rf gold and ingenuity they have the potential to become the strongest.

charlie said:
This m4v converter for mac supports converting M4V to iPod touch, iPod classic, iPod nano, iPhone, Apple TV, PSP, Creative Zen, iRiver PMP, various video mobile phones and many other digital video and audio players.
flv converter for mac supports set video output settings including resolution, frame rate, encoder, bit rate. Set audio output settings including sample rate, channel, encoder and bit rate.

sealonline cegel (URL) said:
We do not lose all ,at least we still have our own beliefs and strong thoughts. Also with the sealonline cegel we can start our life for anther time, and as long as I insist that you can too.

UserName said:

9 Dragons gold (URL) said:
Everyone in 9 Dragons online game should have 9 Dragons gold.

cheap rappelz rupees (URL) said:
However, normal players can get there, usually by accident, by attacking an auto-trap. Auto-traps are used to catch bots with more cheap rappelz rupees .

cheap zeny (URL) said:
If you can not afford to buy the two-hand with cheap zeny you could not look down.


sohbet chat sohbet chat çet sohbet chat özcan sarıca ile kurtlar vadisi pusu 3.sezon 1.seo yarışması aytug akdogan ödüllü 1. seo yarışması ve yurtta barış dünyada barış sesli chat sesli sohbet sesli görüntülü chat görüntülü sohbet kameralı sohbet kameralı chat bayan arkadaş görüntülü çet sesli muhabbet kızlarla sohbet kızlarla chat kameralı çet kameralı sohpet kızlarla çet chat gizli kamera güvenlik sistemleri kamera güvenlik kamerası cilt bakımı cilt bakım ürünleri ıslak mendil kolonyalı mendil kolonyalı mendil güvenlik kamerası gizli kamera kamera canlı sohbet sohpet sohbet sesli sesli chat sesli sohbet kameralı sohbet kameralı chat görüntülü chat görüntülü sohbet bayanlarla sohbet sesli muhabbet bayanlarla chat kızlarla sohbet bayan arkadaş görüntülü çet sesli çet sesli sohpet seslichat sesliçet kameralı sohpet kameralı çet kızlarla sohpet kızlarla çet sesli sohbet sesli sohbet sesli sohbet sesli chat sesli chat chat çet ek iş ek gelir mirc avşa adası avşa avşa adası avşa tatil tatil köyleri "Trkycmhrytllbtpydrklcktr" Trkycmhrytllbtpydrklcktr Trkycmhrytllbtpydrklcktr "Trkycmhrytllbtpydrklcktr" "Trkycmhrytllbtpydrklcktr" Trkycmhrytllbtpydrklcktr özcan sarıca ile kurtlar vadisi pusu 3.sezon 1.seo yarışması özcan sarıca ile kurtlar vadisi pusu 3.sezon 1.seo yarışması aytug akdogan ödüllü 1. seo yarışması ve yurtta barış dünyada barış aytug akdogan ödüllü 1. seo yarışması ve yurtta barış dünyada barış "adtech ile reklam 2.0 dönemi başlıyor ve Trkycmhrytllbtpydrklcktr r10.net seo yarışması" adtech ile reklam 2.0 dönemi başlıyor ve Trkycmhrytllbtpydrklcktr r10.net seo yarışması adtech ile reklam 2.0 dönemi başlıyor ve Trkycmhrytllbtpydrklcktr r10.net seo yarışması "adtech ile reklam 2.0 dönemi başlıyor ve Trkycmhrytllbtpydrklcktr r10.net seo yarışması" "adtech ile reklam 2.0 dönemi başlıyor ve Trkycmhrytllbtpydrklcktr r10.net seo yarışması" adtech ile reklam 2.0 dönemi başlıyor ve Trkycmhrytllbtpydrklcktr r10.net seo yarışması ıslak mendil ıslak mendil kolonyalı mendil kolonyalı mendil paketleme ambalajlama paket web tasarım seo refreshing towel perde tatil kozmetik haber joy türk radyo aşk haber video tatil tekstilkent yabancı personel çalışma izni



MyTechSis Otomobil Ödüllü Seo Yarışması


MyTechSis Otomobil Ödüllü Seo Yarışması

sohbet
sohbet
sohbet
chat
msn
kimsesiz
edremit pansiyonlari
side pansiyonlar
manavgat pansiyonlar
masra pansiyonlar
antayla pansiyonlar
alanya pansiyonlar
kapadokya pansiyonlar
kusadasi pansiyonlar
ayvalik pansiyonlar
bozcaada pansiyonlar
avsa pansiyonlar
marmaris pansiyonlar
Didim pansiyonlar
penis büyütücü

welcome to wow gold,world of warcraft gold,warcraft gold,world of warcraft gold,wow leveling, the cheapWoW Power Leveling, service site,world of warcraft WoW Power Leveling,fast and secure service.we WoW Power Leveling, WoW gold isn’t found everywhere in the game; WoW Power Leveling,you have to look for it and, when you find it,WoW Gold, you have to save it.WoW Gold,WOW goldis earned through doing things like killing enemies, WoW Gold, hunting and crafting. WoW Gold, is for sale online at a number of locations. buy WoW Gold,The decision wow gold,wow gold to buy wow gold is one Cheap WoW Gold, that many video gamers wrestle with. Cheap WoW Gold,Many World of Warcraft players try to play the game on their own wow power level before making the decision to buy wow gold. Cheap WoW Gold,If you wow gold,want to buy Cheap WoW Gold,wow gold there is nothing wrong with it.WoW Gold, Buying wow gold is similar to finding cheat codes WoW Gold,World of warcraft Power Leveling,World of warcraft Power Leveling,age of conan gold,aoc gold,buy aoc gold,cheap aoc gold,aoc power leveling,age of conan power leveling,aoc power leveling,aoc gold,age of conan gold,age of conan power leveling,maplestory mesos, maple story mesos,maple story mesos,maple story mesos,maple story mesos,Maple Story mesos,MapleStory mesos,ms mesos,mesos,SilkRoad Gold,SRO Gold,SilkRoad Online Gold,eq2 plat,eq2 gold,eq2 Platinum,EverQuest 2 Platinum,EverQuest 2 gold,EverQuest 2 plat,lotro gold,lotr gold,Lord of the Rings online Gold,oil purifier,rolex replica,replica rolex,chongqing,yantai,evening dresses,evening gowns,wedding dresses,bridal gowns,wedding gowns,cocktail dresses,Bridesmaid dresses,prom dresses,formal dresses,Promotional items,Promotional products,Wedding dresses,Pet supplies,Dog clothes,Replica handbags,Replica Watches,wedding cake toppers,cake toppers,digital cameras,digital camera,warhammer online,war gold,digital cameras,digital camera,Mobile Phones,Mobile Phone,Cell Phones,Cell Phone,Mp3,world of warcraft power leveling,world of warcraft power leveling,power leveling wow,power leveling wow,power leveling wow,cheap wow power leveling,cheap wow power leveling,cheap wow power leveling,buy wow power leveling,buy wow power leveling,buy wow power leveling,power leveling,power leveling,power leveling,power level,power level,power level,

Michael (URL) said:
This is just another piece of software... so scalability is just another doable challenge. As long they have enough gimmicks to distract the users while they are fixing the issue, they are fine. The only real problem they face is that due to the viral aspect, their growth is not sustainable from technological prospective... but again it is just a matter of time.

carlton (URL) said:
640-802 Why Can't Twitter Scale? Blaine Cook Tries To Explain I'm not that hungry. Took you long enough.

mirc (URL) said:
hi thanx
very nice
mirc


dfgdf said:
美女交友不用長得帥也可以從美眉的徵男友條件中獲得親睞!




Join the discussion