RE: Multi-master replication

From: Brent Wood <pcreso(at)yahoo(dot)com>
To: Laura Smith <n5d9xq3ti233xiyif2vp(at)protonmail(dot)ch>, Zahir Lalani <ZahirLalani(at)oliver(dot)agency>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: RE: Multi-master replication
Date: 2021-08-14 03:27:43
Message-ID: 579706705.466018.1628911663610@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

BDS
Only using the free v1.0...

Sent from Yahoo Mail on Android

On Sat, 14 Aug 2021 at 2:07, Laura Smith<n5d9xq3ti233xiyif2vp(at)protonmail(dot)ch> wrote: ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Friday, August 13th, 2021 at 12:35 PM, Zahir Lalani <ZahirLalani(at)oliver(dot)agency> wrote:

> Confidential
>
> Thx Laura
>
> So here is the dilemma - everything in the cloud world tends toward horizontal scaling. We do that with PG using single master and multiple slaves. But we are write heavy and of course the load on the master is quite high. It does seem that multi-master has risks (everyone seems to talk about conflict resolution!) so I wonder whether the sensible route is simply to scale vertically on the master?
>

Scaling on the master remains a popular choice these days even in the trendy world of cloud and horizontal scaling.  See, for example Let's Encrypt - admittedly a MySQL/InnoDB infrastructure, but still master/replica - https://letsencrypt.org/2021/01/21/next-gen-database-servers.html

I suppose (depending on the nature of your data), you could perhaps use sharding, so multiple master/slaves with data (and hence load) spread across.  Most likely you would need something like Redis at the frontend to push clients in to the right shard.

Conflict resolution (whether due to split brain or otherwise) is a big worry of mine with multi-master setups.  The Googles and Facebook's of this world seem to be solving the problem on the basis of having super precise time sync setup on their database servers and use high-resolution timestamps to act as tie-break arbitrator.  But of course that comes with significant expense as it needs PTP infrastructure.


In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bret Stern 2021-08-14 16:14:52 Sort question - Fractions, Metric etc
Previous Message Adrian Klaver 2021-08-13 20:48:02 Re: php connection failure