Is Ruby 1.9.1 Ready and Faster for a New Rails Deployment?

I am not going to add this to the discussion of Rails vs Framework X, there are already many. After seriously thinking about which framework I will use for my next deployment, I decided it was very difficult to remove REST from the box. Rails gives you minimal work. This is something that requires a bit more work in Django, and given that I focus on the part of the application API, Rails makes more sense this time. Given how important it is for me to write an application containing heterogeneous clients (iphone / android / tablets) that can have access (and not just web browsers), I need to be able to create a RESTful API with minimal resistance from any structure using.

My question is, is Rails ready to handle not an application the size of Twitter, but what makes about 75,000 unique hits per day? Does Ruby 1.9.1 really improve the situation? There are many stories of nightmares and equally many success stories depending on who you ask. Joel Spolsky (one of the founders of stackoverflow.com), believes that Ruby itself is not ready for prime time , because it is still significantly slower than other interpreted languages. I'm not worried about getting the size of Twitter (this is a problem I want to have on the same day), but nonetheless I have a website with an average of 75,000 unique users per day. I am wondering what scaling problems I will encounter when deciding to use Ruby 1.9.1 + the latest Rails (CPU costs + memory) as part of my API stack, just taking the time to actually increase it a bit, we work in Django to create a RESTful API. As Joel mentions in his article, I don’t want to buy 100 servers when I can buy 10. I would like to see why Rails is now ready to meet my requirements.

+7
ruby django ruby-on-rails
source share
5 answers

We experimented with 1.9 a couple of months ago, and we were so impressed with the speed improvements that we almost immediately started the process of switching to it. The only libraries that did not run smoothly were Facebooker, which one of our developers was able to pay for a couple of days (now the plugin is fully compatible with 1.9) and VPim (iCalendar library), with which we easily switched with the much newer RiCal plugin.

Rails 2.3 is absolutely ready for work by 1.9, and our experience has led to an increase in query time by more than 60%. Our integration tests also received the same benefits. We had 1200 tests that let you run 300 seconds, taking just 110 seconds without any other changes, except switching from Ruby 1.8.7 to Ruby 1.9.1. It also means that we were able to double the amount of load that each of our servers can handle.

Of course, you can use a gem that is not compatible with 1.9, but the vast majority of them or can be compatible with minor changes.

You probably won't have a problem with 75,000 unique visitors, and one server should be able to host a rails application with at least ten times the traffic level if your application is not written very poorly.

+6
source share

Joel's message from TWO THOUSAND AND SIX. This is FOUR years ago. Everything has changed, fortunately :) Ruby 1.9 is ready for prime time. It is compatible with Rails 2.3.5, and Rails 3 is built with Ruby 1.9 in mind, so it will be fully compatible with it.

"My question is, is Rails ready to handle not an application the size of Twitter, but what is approximately 75,000 unique hits per day?"

This is approximately similar to the question, do you think that ten thousand eggs will help you make an omelet, not for the city, but for the family.

+4
source share

It is not a question of whether Ruby 1.9 is ready for Rails, but rather if Rails is ready for Ruby 1.9. From what I read, it seems that Rails itself (ActiveRecord, etc.) works well on it. You may have problems with any ruby ​​stones that you can use that are not ready for 1.9. Check out http://isitruby19.com/ to see if anyone has commented on the specific gems you are using.

+2
source share

My question is, is Rails ready to handle not an application the size of Twitter, but something that is approximately 75,000 unique hits per day?

Which server are you using? What does each request do? If you are running on a single 128meg kernel, then probably not.

Ruby 1.9.1 is really much faster than Ruby 1.8.X, and it is also less hungry. 1.9.2 is just around the corner; Rails 3 actually does all of its Dev work on the 1.9.2 trunk.

On my server I can handle pageviews of 80 thousand days a day without breaking a sweat and not introducing complex caching, if I built some intelligent caching using redis or memcached, I would feel comfortable serving 10-20x of this amount .

You can design wonderfully executable web applications with Ruby and Rails (even on REE 1.8.7). You can create horribly executable web applications written in C ++.

If you understand your platform and know how to optimize it, you can get great performance.

I would probably stay away from Ruby 1.9.1 (if you don't consider yourself an expert on Ruby) due to the lack of several libraries and the fact that the vast majority of Rails applications do not work on it. I tried 1.9.1 a few weeks ago and was able to get my application to work, but it took a bit of Ruby foo.

+1
source share

You should not have problems with Ruby 1.9.1; I just wanted to solve the problem:

75,000 unique users per day

It definitely means nothing. We do not know how many requests per second are being translated for your application. If you really mean 75,000 queries per day, this is trivial - this is less than one query per second. Any infrastructure that cannot guarantee you that before you click on the restrictions imposed by the database or architecture of your application has more problems than the platform on which it runs :-)

+1
source share

All Articles