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 1u4zSG-00AUwp-CY for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Apr 2025 09:53:16 +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 1u4zSE-00B5NO-K4 for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Apr 2025 09:53:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u4zSE-00B5NG-9u for pgsql-hackers@lists.postgresql.org; Wed, 16 Apr 2025 09:53:15 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u4zSC-000Lm5-2t for pgsql-hackers@lists.postgresql.org; Wed, 16 Apr 2025 09:53:14 +0000 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-30c44a87b9cso54075261fa.3 for ; Wed, 16 Apr 2025 02:53:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744797192; x=1745401992; 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=Jaoodw59X/hix5Pup9ZFqrnWjTmhau4I90YU6m+IcWE=; b=aTfZLu/vSF58L55YarhLKYAxXRKdYFv58faE2+mJVny2TbRfHVQ2klhAQ0DDsJKI6A dtW2PIDpJTjl2ErhKe0v92kvwMKU8aYOpgmenVJLtnqvivdqcxuf7v0g9Ri3QxfCXG4e P/ZI9bTPPlQBYIndtSoTGWJerivyXYGKL43fU/QyEjAJagsaLplpfXGVL2iNlaPAowiK poY1kM8pJY4A+AtrHL5RqmwnuPpnDl7tM02prRW6Mx1FlCJXYE6x18mu+5bJwmkL2hW4 ORK3RBVFWHCMwoFBDLKBFTB/ib2VsIRoANy/pflpzuzBE6Vome8Z/YGczPdb2pW1/grr OFwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744797192; x=1745401992; 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=Jaoodw59X/hix5Pup9ZFqrnWjTmhau4I90YU6m+IcWE=; b=TBUV//k8gIxN3fmr4WF/HGYpm71KETwrBCQ7k0MHmoe4UyFdarC7ZKAILBKYkx8fJf D7xqflgj+d+Vaqs/v5MpWE8LJiPevTEJZGSK9a4uelB4geCTB0rFMqIW6qedwgUU+0dB WF/i33quLRZ8bx8Gv5fDnX/ARRpDjSKSKN2MYXagq3n5xFjSWTnWkoKQTFOiN3Lo3bGj GZB6G4VCmqTgMvjrS2JwqJZSsAX3URFdEon4UPkZc1esxQrq0ox6rI84ZCh/RXHen9m+ XC3bmAjKGKm5wO7ihUKwJ/09u5WD3wrSbx05MZjYKlWlkDXwkEkiFI0j3i7ja3IVTxHB 2tnA== X-Forwarded-Encrypted: i=1; AJvYcCUsUIftr8vbsgCozguXRwHmJcBR4cRkRKfKPqhDXpb7HZykmQxiOcezmpsWRCpyR0+0xvuZConNXSUHPaKT@lists.postgresql.org X-Gm-Message-State: AOJu0YwJmrCPdK7WNb5RmlSbY0DB2YPu1OckR6PBDTXyLScjx+Bv+6P6 fRWrNsQAXX28YHRjWvHptpf0nRiUAQ/xxbDCaSH29PBOi7wt/Xg= X-Gm-Gg: ASbGncuaHs0zV2jgjdUTS0yFPrRAbZ/ZSbgL3SHE8S7Z0dhPD4LJiR8/1X6M2HuRozc fKHAxmdDkHov8BquD3AbPbjjh1w0xR30P8dIweRnjOS5dnURPAcPcushcUFLa5zTeccDaJewg2a Dezt9NPSK+2KtrJhD4m0sdBJiiUt7fgk9ib0mzPi28Y/JqCfkss6gSj/vHkL/fHjAp7XUk0Fqqv VfgfPfkilWWq5eSTeEL9gy+SPrzkNwQsOm+4tBG0dWe+zql3nA1FePZVm/N3vi5fTAwM6Hks+WP 8vgiqSJL3DwdBORe1zkat1Urr7T9+h8m7yUbr5ckBg== X-Google-Smtp-Source: AGHT+IF+imVZ8odBRxzl6OVC2BN4sgrbk2Sq51vXODmJFx3HyjCXyXvA8AFRbNQFWtxBvMXOLuigsQ== X-Received: by 2002:a05:651c:54a:b0:30c:2ff9:913f with SMTP id 38308e7fff4ca-3107f68c24dmr4103691fa.2.1744797191474; Wed, 16 Apr 2025 02:53:11 -0700 (PDT) Received: from ark.local ([104.28.230.246]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30f4638da16sm24753611fa.0.2025.04.16.02.53.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Apr 2025 02:53:11 -0700 (PDT) Received: by ark.local (Postfix, from userid 1000) id 0596CF20074; Wed, 16 Apr 2025 12:53:10 +0300 (MSK) Date: Wed, 16 Apr 2025 12:53:09 +0300 From: Konstantin Osipov To: Ashutosh Bapat Cc: Andrey Borodin , Tom Lane , Greg Sabino Mullane , Nikolay Samokhvalov , pgsql-hackers@lists.postgresql.org Subject: Re: Built-in Raft replication Message-ID: References: <1798838.1744759182@sss.pgh.pa.us> <20FB597F-641F-48F8-8428-D8DDBA802D58@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 * Ashutosh Bapat [25/04/16 11:06]: > > My view is what Konstantin wants is automatic replication topology management. For some reason this technology is called HA, DCS, Raft, Paxos and many other scary words. But basically it manages primary_conn_info of some nodes to provide some fault-tolerance properties. I'd start to design from here, not from Raft paper. > > > In my experience, the load of managing hundreds of replicas which all > participate in RAFT protocol becomes more than regular transaction > load. So making every replica a RAFT participant will affect the > ability to deploy hundreds of replica. I think this experience needs to be detailed out. There are implementations in the field that are less efficient than others. Early etcd-raft didn't have pre-voting and had "bastardized" (their own definition) implementation of configuration changes which didn't use joint consensus. Then there is a liveness issue if leader election is implemented in a straightforward way in large clusters. But this is addressed: scaling up the randomized election timeout with the cluster size, converting most of participants to non-voters in large clusters. Raft replication, again, if implemented in a naive way, would require a O(outstanding transaction) * number of replicas amount of RAM. But that doesn't have to be naive. To sum up, I am not aware of any principal limitations in this area. -- Konstantin Osipov, Moscow, Russia