Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

One meme about Rails is that Rails can't Scale. Is it known how this meme started? Was there a particular blog post that argued this is the case?

share|improve this question
2  
If you can answer the question "how [did] this meme start?" then it's not really a meme :-) –  James Apr 11 '11 at 9:55
add comment

5 Answers

I would say that there are real technical issues behind it. The Ruby implementation (at least ruby 1.8) is not designed for concurrency : ruby 1.8 has a global interpretor lock, and it uses green threads instead of OS native threads.

So, for a web application to scale, you have to run multiple ruby interpretors, and make them work together.

Note : I am not into web development, and It's been a long time I haven't used ruby. Maybe ruby 1.9 or JRuby don't have these issues. Maybe the global lock is not a real problem for scaling up.

share|improve this answer
    
JRuby doesn't have the same problem, but Ruby 1.9 does. –  dan_waterworth Apr 11 '11 at 13:00
add comment

Well, to scale, you need reasonable performance per line of code, right? I'm not talking C++ levels, but ... check out

http://dada.perl.it/shootout/index.html

for example on heapsort

But hey, Ruby is faster than vbscript!

share|improve this answer
2  
For those wondering, Red = CPU, Green = Memory. –  Justin Apr 11 '11 at 4:58
2  
I'm not a hard-core Rubyist but I bet I can think of the come-back: You can do much more with a single line of Ruby than you can with a single line of C++. Seriously, why is "line of code" a good base unit? –  James Apr 11 '11 at 9:04
2  
Your mixing up scalability with performance; scalability is ability to increase the performance by throwing hardware at the problem. –  dan_waterworth Apr 11 '11 at 12:56
3  
My question is, what the heck is up with vpascal? –  quanticle Apr 11 '11 at 13:34
2  
That's Ruby 1.6.7, which is more than a little outdated. –  mipadi Apr 11 '11 at 14:46
show 1 more comment

I think it was because Twitter was driven by Ruby on Rails and around mars-may 2008 they had some significant downtimes which started the meme

share|improve this answer
1  
They had to switch to scala because of that, too. –  Mahmoud Hossam Apr 10 '11 at 6:36
    
@Mahmoud Hossam didn't they only swap out performance critical parts to scala and leave the rest as Rails? –  alternative Apr 10 '11 at 11:51
    
@mathepic I think the UI parts are still written in Rails, check their github for more details. –  Mahmoud Hossam Apr 10 '11 at 12:02
add comment

As mentioned, there were several "hot" ror startups that suffered issues scaling. I believe that's where the issue primarily came from.

However, there's been performance issues with ruby/ror in the history prior to those meltdowns.

See: Ruby interpreter leaking memory on long running processes:

http://groups.google.com/group/god-rb/browse_thread/thread/01cca2b7c4a581c2

http://engineering.twitter.com/2011/03/building-faster-ruby-garbage-collector.html

DHH's "rails myths" which documents 400 restarts per day:

http://www.loudthinking.com/posts/31-myth-2-rails-is-expected-to-crash-400-timesday

And of course the infamous rails is a ghetto rant from Zed Shaw.

share|improve this answer
add comment

I'm guessing it has to do with the fact that Rails is based around the Active Record pattern, which is quick and easy to get started with, but can slide into a constant refactoring battle as your app's complexity increases. I think that's why you hear about startups in particular having troubles: they're able to get something working quickly, but as they add features, the complexity grows and that's when the trouble starts.

share|improve this answer
    
Speaking from experience creating a Rails application, I will second this. Not just in scaling but Rails in general runs into issues when you need to do more than just reading/writing a single record from a database. If you need some kind of complex business logic, for instance, Rails can hinder you more than it benefits you. It's still a superb framework and a beautiful language, but it's not perfect (not that anything is "perfect" in programming). –  Wayne M Apr 11 '11 at 13:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.