From: | Martin Gudmundsson <martingudmundsson(at)gmail(dot)com> |
---|---|
To: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Bi-Directional replication client awareness |
Date: | 2014-07-12 09:34:24 |
Message-ID: | DA43A95F-E84F-4F49-B350-E02876C2B2C0@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>>
>> Because BDR is asynchronous multi-master _replication_ though, clients
>> are expected to be aware of some of the anomalies that can occur. A
>> naïve client that just picked a random BDR server and did the next
>> transaction on it would be very likely to cause unwanted replication
>> anomalies, apply conflicts, etc.
>>
>> For example, if the client inserted a row on one server then tried to
>> immediately update it on another, the update would likely fail because
>> the row probably hasn't replicated yet.
>
> Any ideas giving BDR an option to be synchronous. I mean in ”close quarters” with low latency it should work ok.
Just to clarify, I don't mean a 48 node synchronous group, but perhaps allow one synchronous ”neighbor” node.
That way we could get two synch writeable nodes in one datacenter(or 2 datacenter really close to each other. common in Europe), and can be combined with asynch nodes in more distant datacenters. That would enable load balancing between 2 nodes for all type of queries.
Synchrounous Streaming Replication is supported with BDR, but that only gives support for a read-only replica. It does not give a fully writeable node.
Figuring out what queries are readonly to direct to a readonly replica, is not the easiest thing, if I’ve understood documentation for pgpool etc correct.
>
>> It is generally a good idea to make clients "sticky" to a given server,
>> but clients also need to be aware of replication anomalies unless each
>> server's data is a self-contained shard that doesn't interact with the
>> others. In which case you probably wouldn't be using BDR
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2014-07-12 10:22:30 | Re: Bi-Directional replication client awareness |
Previous Message | Michael Paquier | 2014-07-12 07:01:03 | Re: debugging with gdb |