pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Abhay Gupta <gupta.abhay86@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Azure Postgresql High connection establishment time
Date: Mon, 20 Sep 2021 13:34:19 -0700
Message-ID: <0bdf6733-14db-c935-419c-fb060711e181@aklaver.com> (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 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.klaver@aklaver.com





view thread (6+ messages)  latest in thread

Message-ID: <0bdf6733-14db-c935-419c-fb060711e181@aklaver.com>
Permalink:  ../0bdf6733-14db-c935-419c-fb060711e181@aklaver.com/
Also on:    postgresql.org/message-id/0bdf6733-14db-c935-419c-fb060711e181@aklaver.com

 · 

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: adrian.klaver@aklaver.com, gupta.abhay86@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: Azure Postgresql High connection establishment time
  In-Reply-To: <0bdf6733-14db-c935-419c-fb060711e181@aklaver.com>
  References: <CACpkcfw2+OB=B17-DkNC8erAPALYPLErK2opGv6LhKWU+L6f6A@mail.gmail.com> <1817783.1632158180@sss.pgh.pa.us> <CACpkcfwkdHBX2Qqwp8rZ0-V6CASzcoDikfG-R8mbVVNq64VwLg@mail.gmail.com> <0bdf6733-14db-c935-419c-fb060711e181@aklaver.com>

* 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