We have a master/slave MySQL setup and we were wanting to split some of the reads to the slave.
Basically, we want it to be set up as such:
Right now we have a custom DB_Adapter that extends Zend_Db_Adapter_Pdo_Mysql. What I was thinking about doing was just setting up another variable in the config.ini file that authenticates to the slave using a read_only credential set, then instantiating a second DB_Adapter in the bootstrap using Zend_DB::factory($config->slaveDatabase);
I also came across Zend_Application_Resource_Multidb. Is there any advantage to using the Multidb resource for this over just creating a second set of variables?
And is there any way to set the failover so that if the slave is down any reads using it will use the master instead?