Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Not sure if I quite understand your complete use case. Is it that you simply want to distribute reads/writes across the different databases for different API calls ? </p> <p>If it is a small application why don't you have all 3 applications on site 1, site 2 and site 3 connect to the same database instance ?</p> <p>Following options:</p> <ol> <li><p>Master Slave Replication</p> <p>In your case you would have 1 master db and 2 slave db. Data will be read and written to the master db but will be replicated to the slaves. You can then configure your rails application to do reads across selected databases.</p> <p>You can use <a href="https://github.com/tchandy/octopus" rel="nofollow">Octopus</a> to distribute writes/reads between slaves and master.</p> <blockquote> <p>When using replication, all writes queries will be sent to master, and read queries to slaves.</p> </blockquote></li> <li><p>MySQL Cluster</p> <p>I have not used MySQL cluster yet but should be using it soon. If your requirement is to distribute reads/writes across all the databases while having the data remain consistent across all nodes MySQL cluster looks like a good candidate. The data is distributed across a pool of data nodes. Every MySql server has access to all the data nodes and as result when a server within the cluster changes data example by inserting rows, this new data is immediately accessible and seen by the other MySql servers in the cluster.</p> <p>See more here <a href="http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster-overview.html" rel="nofollow">MySql Cluster</a></p></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload