Master Slave database setup. Overriding several CakePHP functions and add random slave initiation. All credits to Farsinsen https://github.com/peterfarsinsen