Search code examples
ruby-on-railsdatabaseactiverecordsharding

Database sharding and Rails


What's the best way to deal with a sharded database in Rails? Should the sharding be handled at the application layer, the active record layer, the database driver layer, a proxy layer, or something else altogether? What are the pros and cons of each?


Solution

  • FiveRuns have a gem named DataFabric that does application-level sharding and master/slave replication. It might be worth checking out.