Xavier Vidal Piera wrote:
> 
> Hi
> 
> Talking about scalability and database replication, i'm looking forward to
> setup an application that will use a MySQL Master and a couple of MySQL
> Slaves.
> 
> At the moment my ZF actual setup is using only one Database Adapter but
> we're moving to a new setup using replication.
> 
> Is Zend_Db_Table ready to manage this kind of replication setups? As a
> example, now a Zend_Db_Table_Row will save and update rows using the same
> connection. A useful feature will be if zend_db_table / zend_db_table_row
> can detect if there are more than one database profile and use them based
> in
> reading / writing.
> 
> Can anyone provide more info about this term?
> 

It's not build into Zend_Db but you should be able to implement it yourself
quite easily.
The problem is that sending all read queries to slaves might not work very
well.
Because of the replication lag you may show stale data after users edits his
profile etc.
It may be better to switch adapters in your application based on the
context, use master
if you need write & read and slave for cases where data is only read, like
reporting.

Karol
-- 
View this message in context: 
http://www.nabble.com/Database-profiles-for-reading-writing-with-Zend_Db-tp20010673p20011604.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to