Menu

replication mechanism

Help
W S Chung
2011-07-19
2013-07-05
  • W S Chung

    W S Chung - 2011-07-19

    I understand that HA-JDBC performs mirroring so that all databases in the
    cluster is the same. I would like to know more about how this is achieved and
    how reliable this mirroring is. I understand that some replication mechanism
    involves a delay between the master and the slave. Failure of the master could
    result in some data loss. Will there be similar data loss in HA-JDBC?

     
  • Paul Ferraro

    Paul Ferraro - 2011-07-21

    The "replication mechanism" is really simple, actually - it's just a smart
    client-side proxy. Failure of one database won't result in data loss, since
    any given write request is destined to all databases. The advantage of HA-JDBC
    over master/slave replication, is that a database can fail in the middle of a
    user transaction and the user's transaction can still complete normally.

     
  • Samuel Park

    Samuel Park - 2013-07-05

    By combination of local and weight properties in HA-JDBC XML configuration, I had tried to achieve the "mirroring" of my two oracle servers. But my HA-JDBC client always wrote (insert/update/delete) to only one database, not to both of them. What did I missed? I used HA-JDBC 2.0.16-rc-1. Here is my HA-JDBC configuration:

    <ha-jdbc>
    <sync id="passive" class="net.sf.hajdbc.sync.PassiveSynchronizationStrategy"/>
    <cluster balancer="simple" default-sync="passive" dialect="oracle" meta-data-cache="lazy" transaction-mode="serial">
    <database id="db1" local="true" weight="1">
    <driveroracle.jdbc.OracleDriver</driver>
    <url>jdbc:oracle:thin:@x.x.x.x:1521:SID</url>
    </database>
    <database id="db2" local="false" weight="0">
    <driver>oracle.jdbc.OracleDriver</driver>
    <url>jdbc:oracle:thin:@x.x.x.x:1521:SID</url>
    </database>
    </cluster>
    </ha-jdbc>

     

Log in to post a comment.