High latency on Application Gateway

Firoj Siddique 0 Reputation points
2024-07-24T17:21:46.8633333+00:00

I am having a server where i have hosted a webapp.
The time i am using a azure lb i am getting latency in ms (400-600ms) from my server, but the minute I starts using azure app gateway with path based routing i am getting latency in secs going upto 20secs.
What either i am missing or need to add here so that i can achieve the optimal latency.

Thanks in advance.

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,079 questions
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
451 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. KapilAnanth-MSFT 46,776 Reputation points Microsoft Employee
    2024-07-25T06:26:28.5666667+00:00

    @Firoj Siddique ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    Comparing Load Balancer and Application Gateway latencies is not a right approach.

    • As Load Balancer is L4 and does not require much processing of incoming request
    • However, with App gateway, there is a lot of processing required

    Have a look at : Application Gateway timing metric

    • Backend connect time - refers to the time taken by App gateway for TCP + TLS Handshake
    • Backend last byte response time - App gateway + Backend processing time

    You can cross reference this with App gateway Access log

    • serverResponseLatency = Backend last byte response time
      • Use this to find out how long did the backend take to process the request and send it back
    • clientResponseTime
      • Time difference (in seconds) between the first byte and the last byte application gateway sent to the client. Helpful in gauging Application Gateway's processing time for responses or slow clients.

    This should give you an idea on how various latencies are introduced.

    • Can you share an entire row of App gateway Access log
    • So we can see how long did the backend take to respond?

    Cheers,

    Kapil

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.