Re: Azure Postgresql High connection establishment time

From: "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Azure Postgresql High connection establishment time
Date: 2021-09-20 20:47:18
Message-ID: YUjzVhijHuOiJHYz@hjp.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 currently we
> are in development phase there is no load on the server at all. No encryption
> 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 on 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.

--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp(at)hjp(dot)at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tim Uckun 2021-09-21 06:00:18 Timestamp with vs without time zone.
Previous Message Adrian Klaver 2021-09-20 20:34:19 Re: Azure Postgresql High connection establishment time