List:General Discussion« Previous MessageNext Message »
From:Devananda Date:October 28 2005 4:08pm
Subject:Re: Circular Replication
View as plain text  
Jigal van Hemert wrote:
> Stefan Kuhn wrote:
> 
>> Am Thursday 27 October 2005 12:56 schrieb Raphaël 'SurcouF' Bordet:
>>
>>> Le vendredi 16 septembre 2005 à 18:14 +0200, Stefan Kuhn a
> écrit :
>>>
>>>> I'm using it with four machines (geographically separate) and it works
>>>> fine. Stefan
>>>
>>>
>>> And can writes on each server in simultaneous time ?
>>
>>
>> I don't understand the question. Replication is pretty fast, but is 
>> not guaranteed to happen in a certain time (not real-time).
> 
> 
> Stefan,
> 
> I think Raphaël wants to know if a user can use any server in the circle 
> to update or insert records and that the changes will be replicated to 
> all other servers.
> 
> In another thread he stated that it was for maintaining student 
> information on various remote locations (a student can login into the 
> system on any of the locations).
> 
> What happens if a record is updated on two servers and the changes are 
> forwarded to the other servers in the circle? I dont' think that this 
> would occur often with student information, but both the student and the 
> administration department might update a record "simultaniously" (in 
> comparison to the speed of replication with several remote locations).
> 
> Regards, Jigal.
> 
> 

Any time you are running circular replication, it is possible for a 
situation to arise where two servers receive "conflicting" updates at 
nearly the same time; this can cause replication to stop on both servers 
at the point where they read the other server's conflicting update from 
their master's binary log.

For example, imagine 4 servers, A->B->C->D->A, and imagine that A and C 
both receive an insert statement containing the same unique key. 
Replication would stop when A reads C's insert from D's binary log, and 
when C reads A's insert from B's binary log. When this type of conflict 
happens, it can be difficult or impossible to restore data integrity 
between all servers. Another example, imagine that A had received an 
update like "SET $val = $val + 5" while C had received "SET $val = $val 
* 2". These would not conflict - in the sense that replication would 
continue uninterrupted - but data integrity would be lost.

In short, any time you are running circular replication, you have to 
ensure that updates are processed in the same order on all servers, or 
know that the order is irrelevant to your data integrity.


Regards,
Devananda vdv
Thread
Circular ReplicationJeff16 Sep
  • Re: Circular ReplicationDan Nelson16 Sep
    • RE: Circular ReplicationJeff16 Sep
      • Re: Circular ReplicationDevananda16 Sep
  • Re: Circular ReplicationStefan Kuhn16 Sep
    • Re: Circular ReplicationRaphaĆ«l 'SurcouF' Bordet27 Oct
      • Re: Circular ReplicationStefan Kuhn27 Oct
        • Re: Circular ReplicationJigal van Hemert27 Oct
          • Re: Circular ReplicationDevananda28 Oct
RE: Circular ReplicationJeff McKeon16 Sep
  • RE: Circular ReplicationJeff16 Sep
    • Re: Circular ReplicationDevananda16 Sep
      • Re: Circular ReplicationSid Lane19 Sep
        • Re: Circular ReplicationAlec.Cawley19 Sep
          • Re: Circular ReplicationSid Lane19 Sep
          • RE: Circular ReplicationJeff20 Sep
            • Re: Circular ReplicationDevananda20 Sep
    • Re: Circular ReplicationBruce Dembecki21 Sep
RE: Circular ReplicationJeff20 Sep
RE: Circular ReplicationJeff21 Sep
  • Re: Circular ReplicationBruce Dembecki22 Sep
    • Re: Circular ReplicationHank26 Sep
      • Re: Circular ReplicationHank26 Sep