Ruby on Rails vs .Net Performance
Posted by Keith Elder | Posted in Uncategorized | Posted on 16-04-2007
Actually the title of this post isn’t even fair. The reason I am posting on these two topics is I have known for a long time that I wasn’t a Ruby on Rails fan. I like the concepts and have played with Ruby a bit but I never bought into it. It is fairly common place that everyone knows it is slow. I even watched a video today of Miguel presenting on Mono (the open source .Net framework) and he even made fun of Ruby and its speed.
Today I ran into two very different scenarios through different means. One was a good friend of mine who posted an article about Ruby on Rails and how it doesn’t scale very well. I won’t repeat his comments so read his blog post. The bottom line is I agree and have been saying the same thing all along. Ruby on Rails demos really great, but when you get into real world apps you have to break the mold and everything falls apart. Basically we share the same sentiment and thus he will continue to be a friend even though he writes PHP for Digg.Com.
The flip side of the coin is a team member sent me an IIS Show post about IIS scalability from Channel9. Basically the show is about a web site running on one server doing 31 million page views a day with IIS and .Net 2.0. Yes, you read that correctly! Here are the numbers talked about in the audio conversation:
Web site: http://www.plentyoffish.com
Server OS: Windows Server 2003 32bit OS
Framework: .Net 2.0
Page views per day: 31 million
Pave views per hour: 2 million
Concurrent users: 40-50K
Servers: 1 IIS Server at 65% capacity and 1 Database Server
Talk about two extremes holy cow! For those nay sayers, MoneyGeek has some interesting numbers and information on the founder Markus Frind here just in case you think Channel9 made this stuff up. Do read the info on MoneyGeek, some fascinating stats there. Combine the audio with the additional information on MoneyGeek and if you aren’t just dumb founded and blown away I can’t help you.
Speed, servers, etc…. Gray, the primary claim Rails developers make is this: the primary speed you should concern yourself with is time to market.
Developers love Rails (I do). I don’t hate .NET, I just love Rails. It’s WAY better than ASP.NET or anything Microsoft has put out for web development until now (please don’t take that “better” personally). So, if we love it – we crank out code happily. I cannot tell you how many times I’ve felt that way working with Ruby. You just feel good using it. That is a subjective thing, I know. Some people won’t like it. So what? That’s why we have other languages! Programmers should be able to drink a beer and chat without getting mean because they love their brand. I do, however, sympathize with Rubyists who get offended when those who do not really know Ruby attack it.
On the other side, MRI (the original Ruby interpreter) has serious problems. For certain things, it is simply is useless on its own. YARV (Ruby 1.9) is probably not going to be fast enough in the long haul (again – this is a completely unscientific statement so take it with grain of salt). The hope lies in Rubinius, which I’m a confident (because of the Rubyists love for Ruby) will kick ass and take names once it is fully released. Just look at the ecosystem around Rails? The sheer variety of awesome gems and plugins just boggles the mind. Look at unit testing with shoulda. Wow!
So, a few more servers costs less than a few more developers? True or not? Ruby is fast enough for what we do.
Lastly, Rubyists tend to nerds (I’m a nerd) who learned Ruby while goofing around with Linux distros or studied computer science where they learn on open source platforms. Microsoft’s leaders attack the very idea of open source software often. In doing so , they alienate the young nerds they hope to employ. Smart or not?
Wow, obviously you can’t.. He said “The speed of improvement of rails is better than the speed of improvement of .NET”
Want to look that over again and adjust your claim?
kthx
I’m sitting here laughing as I type this because you honestly just said a dynamic scripting language was faster than a compiled strongly typed language. Wow. I don’t know where to begin. Perhaps the best place to begin is not even bother.
A wise man once said: “You can’t fix stupid.”
All I have to say is that everything is in the eye of the beholder. If you are a Ruby’s fan then obviously you think that it is the best thing since sliced bread. On the other hand if you are a Microsoft fan, then obviously you are going to look at .Net and be like: oh my gosh this is fast.
I think that both have their advantages and both can be used for specific purposes, but be certain that the speed of improvement of Rails is better than the speed of improvement of .NET.
Ciao,
Jenn
http://www.quantcast.com/traffic-compare.jsp?domain0=twitter.com&domain1=plentyoffish.com&domain2=&domain3=&domain4=
Quantcast measures dailly traffic in the US. Given that Twitter is used exclusively by tech people its going to have its ranking skewed at least 100 fold on alexa.
Compete.com also shows Plentyoffish way out in front. http://home.compete.com.edgesuite.net/plentyoffish.com+twitter.com_sess.png
16Million visitors verse 300k for twitter, plentyoffish isn’t even plentyoffish’s largest market.
Keith –
All valid points…
I will be attending a conference this weekend in which the guys from Twitter will be talking about how they’re handling (or not handling) the load. I’ll report back next week.
Hey Josh! I finally posted something where I got you to comment. Nice!
Ok. I searched around and can’t find anything that taunts they get 11K requests / second. Requests are different than page views anyway. and the numbers I’m quoting are page views (there is a difference). I could have a page with 11,000 1 pixel gifs on it and claim I served up 5 million requests today on my site. Sounds impressive, but not really.
According to my searches there are only 60,000 registered users on Twitter total. Here’s a quote from March 21st on Information Week:
“The site launched less than a year ago and has drawn 60,000 users, who essentially tell each other what they are doing”
I don’t think they have approached the dating’s sites capacity of 50K concurrent users if they only have 60,000 subscribers. I also counted up the images on your twitter page and there are 26 images on the page which account mostly for the friends pics on the page. That’s not including all the images in the style sheets.
BTW, twitter is ranked 1,410 on Alexa and Plentyoffish is ranked 718. Again I’ll point out that one of the top traffic sites on the internet is running on one server. Obviously if they are 718 and twitter is 1410 then twitter should only have one server too. I bet that isn’t the case.
BTW, I’m only in the top 1,817,879! Man I have a long way to go! Great to hear from you. – The Elder
I won’t argue with you that a dynamic language, such as Ruby, is going to be inherently slower then a compiled one. One thing I would like to point out however; which I didn’t see mentioned on either your post, or the one referenced, is that the only reason Twitter is having these problems is due to the fact that they are receiving 11k requests/second. Perhaps my math is wrong, but I don’t see how this qualifies as being any less requests then site you mentioned.
I don’t care what you’re using, Rails, PHP, ASP.net, I don’t imagine any framework could handle that load with an out of the box configuration.