I looked up the mysql_replication_adapter - interesting indeed.
Which scheme are you using to select a slave (random or the block syntax ?)
I'm also curious as to what happens to queries that are part of a transaction that involves an update ? In the PHP app, we do the reads from the master database so as to ensure that the transaction will stay consistent. I don't see this documented in the plugin - any idea how it works ?

Shanti

David Schleimer (JIRA) wrote:
     [ 
https://issues.apache.org/jira/browse/OLIO-55?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Schleimer updated OLIO-55:
--------------------------------

    Attachment: mysql_replication.patch

Patch to add ability to use multiple mysql databases in a master-slave 
configuration.  This is a modified version of the adapter mentioned in the 
initial description for this issue.  Specifically it was ported to rails 2.2.2 
(available at 
http://github.com/findchris/mysql_replication_adapter/tree/master), and then 
backported to rails 2.1.2 and modified to default to using the slaves where 
possible.

add support for mysql master-slave clusters
-------------------------------------------

                Key: OLIO-55
                URL: https://issues.apache.org/jira/browse/OLIO-55
            Project: Olio
         Issue Type: Improvement
         Components: rails-app
        Environment: N/A
           Reporter: David Schleimer
           Assignee: Shanti Subramanyam
        Attachments: mysql_replication.patch

  Original Estimate: 96h
 Remaining Estimate: 96h

Add support to the rails app for reading from multiple separate mysql hosts 
while writing to a single mysql master.  Specifically using a modified version 
of mysql_replication_adapter.  the original can be found at 
http://rubyforge.org/projects/mysql-replicate/  The specific modifications are 
to default to using the slaves instead of requiring that you explicitly  mark a 
query as to be directed to a slave.

Reply via email to