Ryan A Graves.com

The dream in action…


05.21

2008

Possible Twitter Solution

This is, yes, another post on Twitter. There are a few things I have read, thought, or have been released since the last post that should be shared. First, the Twitter folks publicly admit they don’t know what the issues are. Isn’t that something that they should have identified by now? Haven’t these issues happened repeatedly? Like I said in another post, I’m relatively new to Twitter so I don’t want to be to critical but it seems they should know by now what is up.

Driving to work this morning my roommate and I were discussing a possible infrastructure that would support the scalability that Twitter so desperately needs. Then today I read a very interesting blog post with a similar solution to Twitters problems. The post is called “A Detailed Five Step Twitter Scaling Plan” posted by Hank Williams. I really like the simplicity of his diagram in his proposed solution.  I don’t want to just repeat his post here but I encourage you to read it.

This is Hank’s simple infrastructure diagram:

Twitter_scaling

His five steps to solve Twitters problems are…

1. Automated CPU provisioning
You really *do* need the ability to provision resources more or less on demand.
2. Denormalization
Every user’s outbound tweets should be stored in a separate database from their inbound tweets
3. Sharding
In the above diagram you see that we have separated users into clusters.
4. Shard Splitting
In the real world each database should continue to grow until it starts to be over burdened. Then you “split the shard” into two databases.
5. Distributed User Lookup
Storing a lookup table for each user that indicates where their inbound and outbound data servers are.

This plan to fix Twitter seems very simple to me. It would be cool if we could get a conversation going in the comments around what other infrastructure solutions people think are viable for Twitter. Also, why do you think the are experiencing so many problems? Let us know.

05.19

2008

Twitter struggles, but is still awesome.

Twitter come on
I got this picture when I tried to login to Twitter this morning…

I was late to join the cult that has become Twitter. At first I thought it was useless. I had a blog already and didn’t need to shrink my blogging. Turns out microblogging is very popular and very useful! It is quickly becoming recognized as one of the best networking tools of the Web 2.0 era. However, they have some issues…namely, it goes down all the time. People love to jump on the “Twitter sucks” train but I’m not here to do that and although this post is pointing out some of the struggles Twitter is having, I’ve still not jumped on that train. I still support you Evan Williams…but don’t test me.

Instead of diving into a bitch session about Twitter being down I’d like to post an excerpt from Twitters blog then comment on it a bit. Excerpt below:

“…We hit some scaling stumbling blocks a few months back, but not because Ruby or Rails was working against us. Once Twitter reached a certain amount of traffic we were forced to rethink our architecture; you don’t build a messaging system the same way you build a content management system. We set about developing custom solutions both inside and outside our Rails application. We also made good use of web scaling standbys: caching, database optimization, more hardware, and shared experience. Throughout this scramble to scale, Ruby and Rails were assets for their speed of development and creative, helpful communities.

For stressed engineers, it’s tempting to think that another solution - anything but what you’re using now! - will solve all your problems. Maybe you start dreaming up the perfect framework on a white board, or maybe you start scouring the web for the fastest, newest, most experimental technology. In the long run, picking a foundation you’re comfortable with and making sensible iterations towards your performance goals will yield a bigger win. You have to be careful while iterating: watch your database, test thoroughly, and be ready to roll back when things break (and they will)…” (to full post)

Rails thumbnailIn the first paragraph they basically get on their hands and knees begging us to have faith in Ruby on Rails. However, at this point I still haven’t heard anyone say for sure that Rails does not have a scaling issue. This post went up in June 07 and still today May 19, 2008 Twitter is having scaling issues.

To the second paragraph, I only have a suggestion: Start considering both options. Going to the white board is pretty drastic I know,  but Twitter will only survive with sufficient scalability, right? I love Twitter, it’s an awesome tool but can it be sold if it doesn’t prove itself to be a sustainable product? Maybe an infrastructure redesign is exactly what the “hacker” ordered.

Either way, I hope they figure it out. The recent outage of Seesmic’s alpha release caused an uproar and I don’t see ‘alpha’ or ‘beta’ anywhere on Twitters site anywhere. I don’t need 140 words for Twitter, I only have 2, “Come on”.