Part 2 of “Scaling your Database” is now up on RailsLab. In this edition, Rails expert Gregg Pollack (http://railsenvy.com/) shares more advice for optimizing database performance. He begins by looking at the differences between SQL storage engines. The two most popular MySQL engines are InnoDB and MyISAM, the default storage engine for MySQL. Gregg covers the pros and cons of each and makes specific recommendations for getting the best usage from them.
For write-heavy apps, Gregg recommends trying Master/Master replication, which has a number of advantages when it comes to scalabilty. Find out why you may want to add some additional tools as well. Finally Gregg explains database sharding, an alternative to Master/Master replication. He illustrates how to split tables between multiple databases, and shares real examples of sharding from New Relic and eBay.