How to configure db redundancy?

You should have a look at mysql proxy... Should be able todo what you
are looking for. Not using Rake but using the proxy.

http://forge.mysql.com/wiki/MySQL_Proxy