High login latency RRS feed

  • Question

  • Using my application (with micro-services approach with Kubernetes) I realise it has a problem with long responses. We have 7 micro-services at the moment. On one page we have list of products with multi-tag filter. Each time you click on one of those then there is a a request to one service witch is querying azure postgres with one request. Long story short it is taking the whole process from about 100ms to 2-3s and sometimes even up to 5s to get results back.

    I realise when making simple 'select 1' with psql from cli taking from my laptop 1.5-2s. From inside a container it going down to ~1-1.5s. After login to postgres cli querying is smooth and it's always <100ms often <50ms.

    So my question is what can causing long connection time/authentication?

    Is it possible that this is caused by the low IOP/s? Mine is variable on test (because is Basic VM with 5GB storage) and 100 IOP/s on General Purpose (prod with 5GB storage).

    Please check my additional research on stackoverflow.

    Cannot add link so to to SO domain /questions/57094912/long-connection-time-with-azure-postgres

    Update: Adding Stack Overflow link:

    Thursday, July 25, 2019 9:45 AM

All replies

  • Hi Piotr,

    Per the same comment on the SO thread, are you running postgre on an Azure VM (IaaS) or are you using the Azure Database for PostgreSQL service (PaaS)?

    Thursday, July 25, 2019 5:21 PM
  • This is Azure Database for PostgreSQL service (PaaS)
    Friday, July 26, 2019 8:23 AM
  • Can you send me your instance name and your subscription ID. Please send and email to AzCommunity.

    There is a gateway that listens for requests, and directs traffic to your instance. Please see: Connectivity architecture in Azure Database for PostgreSQL (link)

    I am going to have the product group take a look at your instance to see if this is across the service in the region you are deploy or if this is specific to your deployment. 

    Can you provide some statistics such as timeframe and duration of the login. This will make the investigation more efficient.

    Thank you,


    Friday, July 26, 2019 4:31 PM
  • Another quick test is to perform a tracert to see where the delay is at. Please see: How to Use TRACERT to Troubleshoot TCP/IP Problems in Windows (link). 

    Please use the FQDN of you database instance name or the IP Address to use with the tracert utility.

    Thank you,


    Monday, July 29, 2019 4:35 AM
  • Want to follow up on this thread to see if a resolution was identified or if you are still experiencing issues?

    Friday, August 9, 2019 5:23 PM
  • Mike,

    We're seeing this issue as well.  The login latency for Azure Database for Postgres is quite bad.  Like 10x worse than AWS bad.  We've opened a support ticket about it, but feel concerned enough about this performance that we're reconsidering putting production workloads on your offering.

    In east region:

    AWS on a similar box delivers a 100-200ms login latency.

    Azure delivers 1-2s usually. 

    We could obviously use a connection pooler, but ideally we're not holding too many idle connections open at a time.


    Tuesday, November 12, 2019 3:45 PM
  • Thank you for this feedback, Cole. Can you send me the support request ID and the instance name to AzCommunity, and I can ensure the product group has visibility. I have an active discussion with regard to latency that is on-going.

    Thank you,


    Tuesday, November 12, 2019 10:45 PM
  • This issue is on the radar of the product group, and a member of the product group should have been in contact with you via the support request that was filed, to discuss in greater detail. Please let me know if you have additional questions or assistance with this issue.

    Thank you,


    Tuesday, November 26, 2019 12:00 AM