A quick primer on sharding for Ruby on Rails - http://bit.ly/15k7Te

Sharding is usually the final strategy to reach for when scaling a
Ruby on Rails application: caching, offloading, and data segmentation
usually come before (they’re usually easier). Here’s info on Ruby on
Rails application sharding, database sharding and filesystem sharding.