Why Can't Twitter Scale? Blaine Cook Tries To Explain
Today, 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




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?
@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.
We're scaling fine at Scribd, and we've got the largest web traffic for any rails site.
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!
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.
Chat
travesti
travesti
travesti
travesti
islak mendil
kolonyali mendil
sohbet odasý
sohbet
mirc
vibrator
vibrator
Sohbet kanallarý
sohbet kanallarý
89
chat odalarý
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ü
very nice
mirc
mirc
Chat
Sohbet
Muhabbet
Sohbet
Kelebek
101 Okey
Thank You
Hosting
web Hosting
Domain
irc Hosting
Warhammer powerleveling
wow power leveling
Warhammer powerleveling
Warhammer powerlevel
Warhammer Gold
Aion powerleveling
Aion Gold