MySQL Replication
Using Your Slaves
You can only write to the master, so use the slaves to do reporting, backups, etc.
Some scenarios may allow a public-facing installation that only requires reads, while the administrative side points to the master.
For use in mixed read/write applications:
my $db = new Solstice::Database('db_name');
$db->writeQuery('INSERT INTO ...');
$db->readQuery('SELECT FROM ...');