Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u52Gr-00B8Zj-JO for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Apr 2025 12:53:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u52Go-00EL3U-Uv for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Apr 2025 12:53:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u52Go-00EL3M-Fl for pgsql-hackers@lists.postgresql.org; Wed, 16 Apr 2025 12:53:39 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u52Gl-000ORy-0S for pgsql-hackers@lists.postgresql.org; Wed, 16 Apr 2025 12:53:38 +0000 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5e5c9662131so10410858a12.3 for ; Wed, 16 Apr 2025 05:53:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cjt-london.20230601.gappssmtp.com; s=20230601; t=1744808015; x=1745412815; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jItkOMdsFVILzGIpSrBYbHvmXdQM/lXI0ZxCtHpMKZw=; b=m+2Q4GZQ3hgddFkY1El8quhvmweAYxEOOdMXkO8JbFH8ojPFHXWymRUq60fM7nSMfT 14YDUivT1LWu+S1ynLzmid5P2uMEfYne2uVCsbeylfB4QqUru0PrWMnThw6Q3eGnXMcv VVcf9p1SLSvqTpqJshHp8enOhaluk3DvC0bR5unwe98sSaIC7yGUkxcfZa6uransTRw6 nHyOvRYqUyjdhSgvID97bikKev/p3a35dQKVsWIvS4XUtZFR0mKkgudX4+PaAfMVDqG+ jhy7YNc8UqIDfGrDXRGjiYTY8NFFnoBeSg1ygfPax+/3nUO2x433tnW+gXmbbS/CUwqz uw8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744808015; x=1745412815; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jItkOMdsFVILzGIpSrBYbHvmXdQM/lXI0ZxCtHpMKZw=; b=TBqGDeKXyJMHgDUK/Q3DzjHki+KZv9Yni+5Dsd4i89BplvbvSNXWif+Ho7JoKuBUO5 l3ZmTDwbkidKQItj2zRxNqmyvaH34f9+tbwG9QlhfXLQ92QGPwHOd5MW/jqFEukdEfy1 9MPx6is0fblR8be1URfNSozm/ol9eMuudEBXtfK0zW6neHNIjHa/+8d5M4L0w1UQyNio SybbpsxUgG9mgsYtCyCN8jHR6YItxwAlWKAD6A3maxuZeopaFn/vhyvNvo+cktFp1fvi sQT3mmLngUoHH909KwfYgZjybZ0UpPaTveH67Z1FkEUSZ//2516OY2q/PupPYAI1hy4B YtQA== X-Forwarded-Encrypted: i=1; AJvYcCWZNs9yEByUU541KWNaCABUPCMWdLySJs++cHXzLxyYlzZ5kJ+XZH71X1xUlEbvcUrZJ3RQnPiiSpQcYgmf@lists.postgresql.org X-Gm-Message-State: AOJu0YxwiLHIFV/gGey5dUJ6Ig1wdnsHSIx7HZsiSiETEHuhLShVvlCb PNxKUn1914vDQpz+1BlS9DocTn1HzL93lL18sd/OLnTyIrKMSN9u3F/+cGwO3lBF2Tguse40Xu5 /OWOxP2oxCkpIX6G0WAbWO0F0c8IiwWk7j2WR5Q== X-Gm-Gg: ASbGncs4K6Ppio8T0Grf+2vO419vlslSV+9lXJe8fuZlNhXVZWPR+l7+/04r4gljpZ2 cWgQOjViOlf4MECqrb+2z3KRA4BnQNgdaWZExFM9Vo9+w/i1Bm5/qa3iwkR+H+ETynXTmmjgKBj Cpvqsysf6jS9NvLzOgtddl X-Google-Smtp-Source: AGHT+IGt2LebJCYpzxfweJlZ7UE28ELeWiNajQumVEHxCZozPB9c49iKoLp26oUypvjPmbSamyySnYLMhobfIGvHcnU= X-Received: by 2002:a17:907:72c6:b0:aca:cda9:3170 with SMTP id a640c23a62f3a-acb42b8d93dmr156602766b.46.1744808014791; Wed, 16 Apr 2025 05:53:34 -0700 (PDT) MIME-Version: 1.0 References: <1798838.1744759182@sss.pgh.pa.us> <20FB597F-641F-48F8-8428-D8DDBA802D58@yandex-team.ru> <212D5973-FDD0-4CF5-BCD0-2760EC319DF3@yandex-team.ru> In-Reply-To: From: Alastair Turner Date: Wed, 16 Apr 2025 13:53:23 +0100 X-Gm-Features: ATxdqUFGHbPh1KI_i9sx2K9Fs7RdgAXDwn3DRH5B6J3GtRPN_ttZiyoPewo1Wps Message-ID: Subject: Re: Built-in Raft replication To: Ashutosh Bapat Cc: Andrey Borodin , Tom Lane , Konstantin Osipov , Greg Sabino Mullane , Nikolay Samokhvalov , PostgreSQL Hackers Content-Type: multipart/alternative; boundary="000000000000ec68460632e4c585" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000ec68460632e4c585 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 16 Apr 2025 at 07:18, Ashutosh Bapat wrote: > On Wed, Apr 16, 2025 at 10:29=E2=80=AFAM Andrey Borodin > wrote: > > > > If you use build-in failover you have to resort to 3 big Postgres > machines because you need 2/3 majority. Of course, you can install > MySQL-stype arbiter - host that had no real PGDATA, only participates in > voting. But this is a solution to problem induced by built-in autofailove= r. > > Users find it a waste of resources to deploy 3 big PostgreSQL > instances just for HA where 2 suffice even if they deploy 3 > lightweight DCS instances. Having only some of the nodes act as DCS > and others purely PostgreSQL nodes will reduce waste of resources. > > The experience of other projects/products with automated failover based o= n quorum shows that this is a critical issue for adoption. In the In-memory Data Grid space (Coherence, Geode/GemFire) the question of how to ensure that some nodes didn't carry any data comes up early in many architecture discussions. When RabbitMQ shipped their Quorum Queues feature, the first and hardest area of pushback was around all nodes hosting message content. It's not just about the requirement for compute resources, it's also about bandwidth and latency. Many large organisations have, for historical reasons, pairs of data centres with very good point-to-point connectivity. As the requirement for quorum witnesses has come up for all sorts of things, including storage arrays, they have built arbiter/witness sites at branches, colocation providers or even on the public cloud. More than not holding user data or processing queries, the arbiter can't even be sent the replication stream for the user data in the database, it just won't fit down the pipe. Which feels like a very difficult requirement to meet if the replication model for all data is being changed to a quorum model. Regards Alastair --000000000000ec68460632e4c585 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, 16 Apr 2025 at 07:18, Ashutosh Ba= pat <ashutosh.bapat.oss@= gmail.com> wrote:
On Wed, Apr 16, 2025 = at 10:29=E2=80=AFAM Andrey Borodin <x4mmm@yandex-team.ru> wrote:
>
> If you use build-in failover you have to resort to 3 big Postgres mach= ines because you need 2/3 majority. Of course, you can install MySQL-stype = arbiter - host that had no real PGDATA, only participates in voting. But th= is is a solution to problem induced by built-in autofailover.

Users find it a waste of resources to deploy 3 big PostgreSQL
instances just for HA where 2 suffice even if they deploy 3
lightweight DCS instances. Having only some of the nodes act as DCS
and others purely PostgreSQL nodes will reduce waste of resources.

The experience of other projects/products with automa= ted failover based on quorum shows that this is a critical issue for adopti= on. In the In-memory Data Grid space (Coherence, Geode/GemFire) the questio= n of how to ensure that some nodes didn't carry any data comes up early= in many architecture discussions. When RabbitMQ shipped their Quorum Queue= s feature, the first and hardest area of pushback was around all nodes host= ing message content.

It's not just about the requirement for com= pute resources, it's also about bandwidth and latency. Many large organ= isations have, for historical reasons, pairs of data centres with very good= point-to-point connectivity. As the requirement for quorum witnesses has c= ome up for all sorts of things, including storage arrays, they have built a= rbiter/witness sites at branches, colocation providers or even on the publi= c cloud. More than not holding user data or processing queries, the arbiter= can't even be sent the replication stream for the user data in the dat= abase, it just won't fit down the pipe.

Which = feels like a very difficult requirement to meet if the replication model fo= r all data is being changed to a quorum model.

Regards
Ala= stair
--000000000000ec68460632e4c585--