High network latency, but logs should sub milisecond response time?

46 views
Skip to first unread message

Ryan Sacha

unread,
Oct 1, 2018, 2:57:39 PM10/1/18
to Google App Engine
I can't figure out why when i curl to my service the response fluctuates from a minimum of 400ms upto 1 second and beyond for a simple request that literally just returns a json response. (no db calls, or anything) even static files take >400ms.

In fact i went to the logs and indeed the server only takes 4ms at max. but when a user requests the url it takes a long time.

10-01_18-19-40.png


What am i missing here?

Avg response:

10-01_18-20-34.png


This is not just due to my distance to the server, i'm totally fine with 100ms due to normal network latency.


App.yaml:


runtime: nodejs

env
: flex

service
: default


manual_scaling
:

  instances
: 1

resources
:

  cpu
: 1

  memory_gb
: 1.5

  disk_size_gb
: 10

network
:

  name
: default



Amit (Google Cloud Support)

unread,
Oct 2, 2018, 5:51:39 PM10/2/18
to Google App Engine

Hi Ryan


High latency in application could happen for many reasons. In most cases, it could be related to the geographical locations. Could you please elaborate how do you make sure that it is not for the distance of the server? I would recommend to use ‘traceroute’ to find more details regarding each path which is taking more significant amount of time. If you use HTTPS or a custom domain then compare latency with HTTP requests to your appspot.com domain to isolate whether the latency is caused by these factors. Also please check if there are any bandwidth limitations,could be in local ISP,  between your clients and Google. I have found this blog post helpful for latency troubleshooting, you can check this too.

Reply all
Reply to author
Forward
0 new messages