Re: Azure Postgresql High connection establishment time

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Abhay Gupta <gupta(dot)abhay86(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Azure Postgresql High connection establishment time
Date: 2021-09-20 20:34:19
Message-ID: 0bdf6733-14db-c935-419c-fb060711e181@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9/20/21 10:37 AM, Abhay Gupta wrote:
> Hello Tom
>
> Thanks for taking time in looking into this for us. Apologies for not
> providing any required data.
>
> 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.
>
> We are only opening 1 connection in our application i.e. after all the
> work is done for that user session than only we close the connection.
>
> If you could assist in what we can check will be very helpful.

Per upstream comment take a look at connection pooling.

Two solutions that come to mind:

Pgpool-II

https://www.pgpool.net/mediawiki/index.php/Main_Page

PgBouncer

http://www.pgbouncer.org/

>
> Thanks
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter J. Holzer 2021-09-20 20:47:18 Re: Azure Postgresql High connection establishment time
Previous Message Abhay Gupta 2021-09-20 17:37:52 Re: Azure Postgresql High connection establishment time