title: MySQL Cluster (NDB) vs MySQL Replication (InnoDB) for Rails 3 apps: pros/cons?
body: <p>We are doing an overview of our current systems, trying to figure out if we can improve performance &amp; reliability.</p>
  
  <p>Currently we run a bunch of internal Rails apps and our Rails based website. Some are Rails 3 already, some are being converted to Rails 3. They all connect to the following MySQL Setup.</p>
  
  <p><code>mysql01 ( master server) =&gt; mysql02 (slave)</code> => ( daily DB backups to a drive, that is backed up on a daily, weekly, monthly &amp; semi-annual basis).</p>
  
  <p>All writes happen on mysql01 and most short reads go to it as well, some "more resource consuming reads" ( like monthly/weekly reports that take 3-10 minutes to run and dump data into csv or backups) go to mysql02 server.  We get about 3-5K visits per day to our site, and have about 20-30 internal users, that use various apps daily for inventory , order processing, etc. So these servers are not particularly under heavy loads other then those reports, that run of the slave anyways.</p>
  
  <p>All servers run in a <code>virtualized XEN</code> pool on Debian Lenny VMs. </p>
  
  <p>So we are doing a review of the systems, and somebody threw a suggestion of switching to <code>MySQL Cluster (NDB)</code> setup. I know of it in theory, but have never actually run it. So does anyone who had experience with it know of any pro / cons vs our current setup, and of any particular caveats when it involves Ruby / Rails applications?</p>