Обсуждение: Need assistance for replication sync issue
Hello,
I need some help with a database issue we’re facing. We have a situation where our primary data center and our disaster recovery site are far apart, and this long distance is causing delays in keeping our data synchronized. It’s become a problem as we want our data to be as up-to-date as possible.
Do you have any suggestions for dealing with this kind of situation? We’ve tried a few things, but we’re still struggling with the replication delays caused by the high latency between the sites.
Note: Bandwidth is very low and latency is very high.
I’d appreciate any advice you can provide.
Thanks in advance.
Hi Veerendra,
Is your servers, primary and secondary, the same size? CPU, Memory etc.
Licio Matos
Em qui., 19 de out. de 2023 às 07:12, Veerendra Pulapa <veerendra.pulapa@ashnik.com> escreveu:
Hello,I need some help with a database issue we’re facing. We have a situation where our primary data center and our disaster recovery site are far apart, and this long distance is causing delays in keeping our data synchronized. It’s become a problem as we want our data to be as up-to-date as possible.Do you have any suggestions for dealing with this kind of situation? We’ve tried a few things, but we’re still struggling with the replication delays caused by the high latency between the sites.Note: Bandwidth is very low and latency is very high.I’d appreciate any advice you can provide.Thanks in advance.Get Outlook for iOS
On Thu, 2023-10-19 at 10:08 +0000, Veerendra Pulapa wrote: > I need some help with a database issue we’re facing. We have a situation where > our primary data center and our disaster recovery site are far apart, and this > long distance is causing delays in keeping our data synchronized. It’s become > a problem as we want our data to be as up-to-date as possible. > > Do you have any suggestions for dealing with this kind of situation? Yes: don't use synchronous replication. You are fighting with physics (speed of light), not with an implementation deficiency. You cannot win that fight. Yours, Laurenz Albe
On 10/19/23 05:08, Veerendra Pulapa wrote:
Never use synchronous replication over a WAN. Not only because "physics", as Laurenz mentions, but also because WAN links can be slow, and break more often than LAN links.
Thus, use "async" replication instead.
Hello,I need some help with a database issue we’re facing. We have a situation where our primary data center and our disaster recovery site are far apart, and this long distance is causing delays in keeping our data synchronized. It’s become a problem as we want our data to be as up-to-date as possible.Do you have any suggestions for dealing with this kind of situation? We’ve tried a few things, but we’re still struggling with the replication delays caused by the high latency between the sites.Note: Bandwidth is very low and latency is very high.I’d appreciate any advice you can provide.
Never use synchronous replication over a WAN. Not only because "physics", as Laurenz mentions, but also because WAN links can be slow, and break more often than LAN links.
Thus, use "async" replication instead.
--
Born in Arizona, moved to Babylonia.
Born in Arizona, moved to Babylonia.
Dears,
Thank you all for your response. Below are the general details about our setup.
Our setup is DC & DR.
On DC: Three nodes(one master, Two replicas) and replication mode is asynchronous between DC.
On DR: One replica and replication mode is asynchronous between DC & DR.
All four nodes have the same configuration such as CPU,RAM and Disks.
In DC no replication & in DR yes it's always replication lag due to this our replication got broken.
The setup runs on on-prem RHEL 7.9 and PG 12.x.
Is there a way to perform an incremental data restore if replication breaks at a certain point? The data size is substantial, and when replication breaks between the DC and DR, it takes 3 to 4 days to rebuild the replica.
On Thu, Oct 19, 2023 at 7:23 PM Jwiencek3 <jwiencek3@comcast.net> wrote:
Look at using synchronous replication.Sent from my iPadOn Oct 19, 2023, at 5:38 AM, Licio Matos <licio.matos@gmail.com> wrote:Hi Veerendra,Is your servers, primary and secondary, the same size? CPU, Memory etc.Licio MatosEm qui., 19 de out. de 2023 às 07:12, Veerendra Pulapa <veerendra.pulapa@ashnik.com> escreveu:Hello,I need some help with a database issue we’re facing. We have a situation where our primary data center and our disaster recovery site are far apart, and this long distance is causing delays in keeping our data synchronized. It’s become a problem as we want our data to be as up-to-date as possible.Do you have any suggestions for dealing with this kind of situation? We’ve tried a few things, but we’re still struggling with the replication delays caused by the high latency between the sites.Note: Bandwidth is very low and latency is very high.I’d appreciate any advice you can provide.Thanks in advance.Get Outlook for iOS
As understanded you have DR for backup purposes only.
I think you should not use stream replication to the DR - use only sending of WALs. Definitely you will have lag but it is better to have a lag than break and a need to make pg_dumpall from the beginning.
I think you should not use stream replication to the DR - use only sending of WALs. Definitely you will have lag but it is better to have a lag than break and a need to make pg_dumpall from the beginning.
pt., 20 paź 2023 o 06:17 Veerendra Pulapa <veerendra.pulapa@ashnik.com> napisał(a):
Dears,Thank you all for your response. Below are the general details about our setup.Our setup is DC & DR.On DC: Three nodes(one master, Two replicas) and replication mode is asynchronous between DC.On DR: One replica and replication mode is asynchronous between DC & DR.All four nodes have the same configuration such as CPU,RAM and Disks.In DC no replication & in DR yes it's always replication lag due to this our replication got broken.The setup runs on on-prem RHEL 7.9 and PG 12.x.Is there a way to perform an incremental data restore if replication breaks at a certain point? The data size is substantial, and when replication breaks between the DC and DR, it takes 3 to 4 days to rebuild the replica.On Thu, Oct 19, 2023 at 7:23 PM Jwiencek3 <jwiencek3@comcast.net> wrote:Look at using synchronous replication.Sent from my iPadOn Oct 19, 2023, at 5:38 AM, Licio Matos <licio.matos@gmail.com> wrote:Hi Veerendra,Is your servers, primary and secondary, the same size? CPU, Memory etc.Licio MatosEm qui., 19 de out. de 2023 às 07:12, Veerendra Pulapa <veerendra.pulapa@ashnik.com> escreveu:Hello,I need some help with a database issue we’re facing. We have a situation where our primary data center and our disaster recovery site are far apart, and this long distance is causing delays in keeping our data synchronized. It’s become a problem as we want our data to be as up-to-date as possible.Do you have any suggestions for dealing with this kind of situation? We’ve tried a few things, but we’re still struggling with the replication delays caused by the high latency between the sites.Note: Bandwidth is very low and latency is very high.I’d appreciate any advice you can provide.Thanks in advance.Get Outlook for iOS