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 1u53QU-00BRjQ-LM for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Apr 2025 14:07:43 +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 1u53QS-00Fc9Z-J3 for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Apr 2025 14:07:41 +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 1u53QS-00Fc9P-9G for pgsql-hackers@lists.postgresql.org; Wed, 16 Apr 2025 14:07:41 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u53QQ-000P5r-08 for pgsql-hackers@lists.postgresql.org; Wed, 16 Apr 2025 14:07:40 +0000 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-54991d85f99so892162e87.1 for ; Wed, 16 Apr 2025 07:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744812458; x=1745417258; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=/gm3fCGv7qrC7lTypbbWsqosgV5Bmi+ZeJcot+7ZHS8=; b=mQ0cmY3zOPdTxiMxTgFMfxi3iixEE7iLXktSmC2nd011RZi6wwE6SKfrzLII7sbMF3 rLqYAA7Ps1ACBFMhppSrCI6gdkoemPXsZSPlyADoeJ1n8z14TQtVlz7TnyutlYCEgLdt rEhnWhGCjaerUJeQIDlGffsy9XobrG9si/G45fc3f5zbMbLdNt7iWZ2IU84Wi4urND1Y IXRtjyGdgoLA38VU2wY6gVlb1/M7VVrJT2HVNeIJWW5odZJBbwbNMQ9OWJ9T1/UGiqwj 9SuUJGHMX5uvGMu0O0npuL80uOJzXR+6DNG1D1hMTX7Sj5fG/LZ3bB9uXRbAKnzFdXdF XbeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744812458; x=1745417258; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/gm3fCGv7qrC7lTypbbWsqosgV5Bmi+ZeJcot+7ZHS8=; b=WbnAnJbaUw2UOwmlpdEQmbaesr96RT4/OXzoCq8cejkkf//zZnbOzTQV7ufTzKBGP4 07OITZwa12jTlL8v7vcYmdLxdIROKQtUVc1c2AlZJSN6wYPPZjhb2EzFFJUt0hawBZ1q Mjjplk/CCn6jHL2f9jpvGmGqVzccyHHkplnEp+QfFxYrhvk2InDfRskBWcLv1UPmCfPE xKS8C+Vg7QePcuJvrzg/i9AoayKeR5zpKys0FYBbYWDDTZazvTugOLpnqpepJavqQ8aQ yobAKm1I6fD6fttWrW62+GvI3rpTBFwjtOqSCBTx/mZeSq2wL7le3d9jYSWPIIWB8obR h1ZQ== X-Forwarded-Encrypted: i=1; AJvYcCWrszcBF/eF1r5y9moUeLjy+ygIpDFLENP/cKs6tNfH6gOmDxtKeHGcefwI6smt/NO1iRCOEieymejtpUVP@lists.postgresql.org X-Gm-Message-State: AOJu0YxBFXMCLPVKsjVxEVOwY1/ikINLjKjGm00SiY+44SfmoYFV+k4A 06yOoZFMQ7qqvmAgCVB2FDjP2YkMWKCJB6FCFo46uYMjseHrFbo= X-Gm-Gg: ASbGncud/3R2MQOZnWAz2KVHqjBeZPVkOlD4ghpSGMLtfgTbBWSrht3EAle8MWosaKB SnWrajY5Yw2t0yvXFrlHqISQrTDVAmsVpuzrMwPvtfDskn8X/mAk8X7r6ktU8lmICVFw7HxjqaB lTKDq+ZcNOQx1CZxSvW3HQc8ZpDWjFLIhKzFQfK3T4k16st9XRbmE9sI2IP09DjI1Lz5xjbAO+W V1EEH9DR1gamtnrb4HB9QWXi9zO3PUbaGnGtQrttyTqIwsowGXi2KyQjf2h9BCl8KIVsR5yISgq tm79p2uKlHtqiB4bsj88YvQhfoudaP5LOUTyO+pxjA== X-Google-Smtp-Source: AGHT+IGCwt2G1R5WKR9IGqDoff/4Qcv1cVtZ+zfC5uw73terjgh7tAxYH+1M/PuR9D4ibhzKk+5QmA== X-Received: by 2002:a05:6512:2349:b0:54a:fe25:43d1 with SMTP id 2adb3069b0e04-54d64b95989mr676930e87.10.1744812457977; Wed, 16 Apr 2025 07:07:37 -0700 (PDT) Received: from ark.local ([104.28.230.247]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54d3d51113bsm1663976e87.171.2025.04.16.07.07.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Apr 2025 07:07:37 -0700 (PDT) Received: by ark.local (Postfix, from userid 1000) id D0D9DF20074; Wed, 16 Apr 2025 17:07:36 +0300 (MSK) Date: Wed, 16 Apr 2025 17:07:36 +0300 From: Konstantin Osipov To: Alastair Turner Cc: Ashutosh Bapat , Andrey Borodin , Tom Lane , Greg Sabino Mullane , Nikolay Samokhvalov , PostgreSQL Hackers Subject: Re: Built-in Raft replication Message-ID: References: <1798838.1744759182@sss.pgh.pa.us> <20FB597F-641F-48F8-8428-D8DDBA802D58@yandex-team.ru> <212D5973-FDD0-4CF5-BCD0-2760EC319DF3@yandex-team.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk * Alastair Turner [25/04/16 15:58]: > > > 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 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 automated failover based on > 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. I agree master/replica deployment layouts are very popular and are not going to directly benefit from raft. They'll still work, but no automation will be available, just like today with Patroni. However, if the storage cost is an argument, then the logical path is to disaggregate storage/compute altogether, i.e. use projects like neon. -- Konstantin Osipov, Moscow, Russia