Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSQCG-0006v9-OC for pgsql-general@arkaria.postgresql.org; Mon, 20 Sep 2021 20:47:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mSQCF-0005oa-Lb for pgsql-general@arkaria.postgresql.org; Mon, 20 Sep 2021 20:47:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSQCF-0005oR-Cl for pgsql-general@lists.postgresql.org; Mon, 20 Sep 2021 20:47:27 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSQCC-0000WP-20 for pgsql-general@lists.postgresql.org; Mon, 20 Sep 2021 20:47:26 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 00E775674; Mon, 20 Sep 2021 22:47:18 +0200 (CEST) Date: Mon, 20 Sep 2021 22:47:18 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Azure Postgresql High connection establishment time Message-ID: Mail-Followup-To: pgsql-general@lists.postgresql.org References: <1817783.1632158180@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RHMebu23HxXM2f/N" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --RHMebu23HxXM2f/N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-09-20 13:37:52 -0400, Abhay Gupta wrote: > Yes, Azure postgresql has a private endpoint attached to it so it is going > through a private link. Also the server has 2 vcore and 5gb. Since curren= tly we > are in development phase there is no load on the server at all. No encryp= tion > and in the connection string we are passing the user and password. It is = Ssl > enabled. To negate it is Azure issue, we installed postgresql 11 on our o= n prem > server and there also we are seeing a connection latency of about 150-200= ms. How are you authenticating? Are you using password hashes stored in the database (MD5 or preferrably SCRAM-SHA-256) or are you authenticating against an external source (e.g. active directory). If the latter, what and how? Can you measure how long the authentication takes? I have seen LDAP authentication against a local AD instance take over hundred milliseconds, so I wouldn't be surprised if that was the culprit. hp PS: a local connection (ident) takes about 3.5 ms on my (not very fast) laptop. --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --RHMebu23HxXM2f/N Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmFI800ACgkQ8g5IURL+ KF0JMhAAlIdEM3TLs8gzGVJ6xinsw96R8Ar4mM7IGhz3BmHYkDPxD7lbf4WwcADi TTNEevWYRnWCGyVTtxe7GLcYlT/ei//oWcOCctOUVQDK8j9DxU4T+28dWvnDDRYv FcwVoqxUtYZjOh+aRUTNeHACLg2FGp9BITLVMF0qJyx1ifnnMYIP/MeP00Q7tpfa mhv2eQ2Ba92sYS80PsDX81fzwsGoYn6fMHamu077PG6OSA+HI9YK4cJeFlYsMgDJ 72omMQgi2gR+WKIUI1IRJ99v+rfd9x2vOsR56hZia6RtbDi64pGTQZ6XqrpDPZxp ev0iG3xZcx/ZrxkklX+kbGzhc1ViL0WWNwZPwVoKYecNowHX19YQKUnIHomgrorc Hlv77iiiu06ZJwb52796ryDAZAa9fujPbHVbbpn7sAX7nYC5LVPQeLIi4xGparZV kg1BIhbRgdbSv/q3lPMUPey1oqpYZy8DOPUItGQz4ehe5TlL4yAPtDMiipOEsGTV cSDUHfg2dzwEMJPcAReFibm1tHh34NL2hFPGLzkp9HmVpR0F7Rn1fG2N3S0UJX7O V9b+lOQ2Is1BZ55W/Eds+vWXYVZFMjhijO2qZ0vUhKO44yp5J25lM7AmYzjlF+KF jwDp0UGZC2rqTgLmqVSpUf9O/xeeLxlcsEhxA53yJKxuLJxVlnA= =hQWl -----END PGP SIGNATURE----- --RHMebu23HxXM2f/N--