Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>One big question that you didn't address is if Application A needs read-only access to the data or if it needs to be read-write.</p> <p>The immediate concept that comes to mind when reading your requirements is <a href="http://en.wikipedia.org/wiki/Shard_%28database_architecture%29" rel="nofollow">sharding</a>. In MySQL, this can be accomplished with <a href="http://dev.mysql.com/doc/refman/5.1/en/partitioning.html" rel="nofollow">partitioning</a>. That being said, before you jump into partitions, make sure you read up on their <a href="http://www.mysqlperformanceblog.com/2010/12/11/mysql-partitioning-can-save-you-or-kill-you/" rel="nofollow">pros and cons</a>. There are instances where partitioning can slow things down if your indexes are not well chosen, or your partitioning scheme is not well thought out.</p> <p>If your needs are read-only, then this should be a fairly simple solution. You can use MySQL in a Master-Slave context, and use App A off a slave. If you need read-write, then this becomes much more complex.</p> <p>Depending on your write needs, you can split your reads to your slave, and your writes to the master, but that significantly adds complexity to your code structure (need to deal with multiple connections to multiple dbs). The advantage of this kind of layout is that you don't need to have complex DB infrastructure.</p> <p>On the flip side, you can keep your code as is, and use a Master-Master replication in MySQL. Although not officially supported by Oracle, a lot of people have had success in this. A quick Google search will find you a huge list of blogs, howtos, etc. Just keep in mind that your code has to be properly written to support this (ex: you cannot use auto-increment fields for PKs, etc).</p> <p>If you have cash to spend, then you can look at some of the more commercial offerings. Oracle DB and SQL Server both support this.</p> <p>You can also use Block Based data replication, such as <a href="http://www.drbd.org/" rel="nofollow">DRDB</a> <a href="http://dev.mysql.com/doc/refman/5.0/en/ha-drbd.html" rel="nofollow">(and Mysql DRDB)</a> to handle the replication between your nodes, but the problem you always will encounter is what happens if your link between the two nodes fails.</p> <p>The biggest issue you will encounter is how to handle conflicting updates in 2 separate DB nodes. If your data is geographically dependent, then this may not be an issue for you.</p> <p>Long story short, this is not an easy (or inexpensive) problem to resolve.</p>
 

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