pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.org
Subject: Re: Azure Postgresql High connection establishment time
Date: Mon, 20 Sep 2021 22:47:18 +0200
Message-ID: <YUjzVhijHuOiJHYz@hjp.at> (raw)
In-Reply-To: <CACpkcfwkdHBX2Qqwp8rZ0-V6CASzcoDikfG-R8mbVVNq64VwLg@mail.gmail.com>
References: <CACpkcfw2+OB=B17-DkNC8erAPALYPLErK2opGv6LhKWU+L6f6A@mail.gmail.com>
	<1817783.1632158180@sss.pgh.pa.us>
	<CACpkcfwkdHBX2Qqwp8rZ0-V6CASzcoDikfG-R8mbVVNq64VwLg@mail.gmail.com>

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@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (6+ messages)

Message-ID: <YUjzVhijHuOiJHYz@hjp.at>
Permalink:  ../YUjzVhijHuOiJHYz@hjp.at/
Also on:    postgresql.org/message-id/YUjzVhijHuOiJHYz@hjp.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: hjp-pgsql@hjp.at
  Subject: Re: Azure Postgresql High connection establishment time
  In-Reply-To: <YUjzVhijHuOiJHYz@hjp.at>
  References: <CACpkcfw2+OB=B17-DkNC8erAPALYPLErK2opGv6LhKWU+L6f6A@mail.gmail.com> <1817783.1632158180@sss.pgh.pa.us> <CACpkcfwkdHBX2Qqwp8rZ0-V6CASzcoDikfG-R8mbVVNq64VwLg@mail.gmail.com> <YUjzVhijHuOiJHYz@hjp.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox