<p>I am looking for a backend solution for an application written in Ruby on Rails or Merb to handle data with several billions of records. I have a feeling that I'm supposed to go with a distributed model and at the moment I looked at </p>

<p><a href="http://hadoop.apache.org/hbase/" rel="nofollow noreferrer">HBase</a> with <a href="http://hadoop.apache.org/core/" rel="nofollow noreferrer">Hadoop</a> </p>

<p><a href="http://incubator.apache.org/couchdb/" rel="nofollow noreferrer">Couchdb</a></p>

<p>Problems with HBase solution as I see it -- ruby support is not very strong, and  Couchdb did not reach 1.0 version yet.</p>

<p>Do you have suggestion what would you use for such a big amount of data?</p>

<p>Data will require rather fast imports sometimes of 30-40Mb at once, but imports will come in chunks. So ~95% of the time data will be read only.</p>

There's a number of different solutions people have used. In my experience it really depends more on your usage patterns related to that data and not the sheer number of rows per table.
For example, "How many inserts/updates per second are occurring." Questions like these will play into your decision of what back-end database solution you'll choose.
Take Google for example: There didn't really exist a storage/search solution that satisfied their needs, so they created their own based on a Map/Reduce model.