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 1szGk3-005BqO-LF for pgsql-general@arkaria.postgresql.org; Fri, 11 Oct 2024 14:35: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 1szGk1-005ghl-P8 for pgsql-general@arkaria.postgresql.org; Fri, 11 Oct 2024 14:35:42 +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 1szGk1-005ghd-Dz for pgsql-general@lists.postgresql.org; Fri, 11 Oct 2024 14:35:41 +0000 Received: from smtp73.ord1d.emailsrvr.com ([184.106.54.73]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1szGjz-000NaG-4E for pgsql-general@postgresql.org; Fri, 11 Oct 2024 14:35:40 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp10.relay.ord1d.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id 6047FA0195; Fri, 11 Oct 2024 10:35:37 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: PGBouncer - Load balancing options From: Christophe Pettus In-Reply-To: Date: Fri, 11 Oct 2024 07:35:06 -0700 Cc: "pgsql-general@postgresql.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Ravi Varma Addala X-Mailer: Apple Mail (2.3776.700.51) X-Classification-ID: e8a3d645-999c-4197-9ced-567a89d26169-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, > On Oct 10, 2024, at 03:02, Ravi Varma Addala = wrote: >=20 > Hello Team,I wanted to reach out to provide some insight into a = request from my customer regarding their multiple PostgreSQL Flex = instances with PGbouncer. Currently, they are utilizing an Azure Load = Balancer which distributes connections using the Round-robin mechanism. = However, they are now seeking a solution that allows for load balancing = based on the number of connections, meaning the Load Balancer should = route requests to the instance with the least number of = connections.Unfortunately, Azure Standard Load Balancer does not support = this capability. However, Application Gateway does offer this = functionality - Microsoft.Network/applicationGateways - Bicep, ARM = template & Terraform AzAPI reference | Microsoft Learn > ASK: >=20 > =E2=80=A2 Has anyone implemented this kind of approach and is it = possible? > =E2=80=A2 Can we do health probe with PostgreSQL to get no of = connections metric? Even though you mention pgbouncer in the subject:, your questions tare = about proprietary products that your employer provides and supports. = It's probably best to ask internally about their functionality; the = community almost certainly does not have any better insight into them.=