I recently migrated to endpoints framework version 2 and started paying 
closer attention to latency. In my case I have a very low traffic app. I 
even tried just using the standard python echo example found here: 
https://cloud.google.com/endpoints/docs/frameworks/python/get-started-frameworks-python
 

So in my case I made sure one backend instance is running and then I 
started issuing basic requests via curl. I also see large unexplained gaps 
in my appstats and the corresponding log latency is much lower than the 
actual latency reported by curl. The unexplained latency overhead is very 
sporadic and ranges from 200ms to 1.3 seconds. Is this just the nature of 
cloud endpoints framework api? Here are some examples:

MacBook-Pro$ curl -H "Content-Type: application/json" -X POST -d 
'{"content":"hello world"}' 
https://testtictactoe-164905.appspot.com/_ah/api/echo/v1/echo -w 
"@curl-format.txt"

{

 "content": "hello world"

}

time_namelookup: 0.005

time_connect: 0.019

time_appconnect: 0.143

time_pretransfer: 0.144

time_redirect: 0.000

time_starttransfer: 0.660

--------

time_total: 0.660


MacBook-Pro$ curl -H "Content-Type: application/json" -X POST -d 
'{"content":"hello world"}' 
https://testtictactoe-164905.appspot.com/_ah/api/echo/v1/echo -w 
"@curl-format.txt"

{

 "content": "hello world"

}

time_namelookup: 0.005

time_connect: 0.021

time_appconnect: 0.145

time_pretransfer: 0.145

time_redirect: 0.000

time_starttransfer: 1.028

--------

time_total: 1.028



MacBook-Pro$ curl -H "Content-Type: application/json" -X POST -d 
'{"content":"hello world"}' 
https://testtictactoe-164905.appspot.com/_ah/api/echo/v1/echo -w 
"@curl-format.txt"

{

 "content": "hello world"

}

time_namelookup: 0.528

time_connect: 0.542

time_appconnect: 0.668

time_pretransfer: 0.668

time_redirect: 0.000

time_starttransfer: 0.912

--------

time_total: 0.912


MacBook-Pro$ curl -H "Content-Type: application/json" -X POST -d 
'{"content":"hello world"}' 
https://testtictactoe-164905.appspot.com/_ah/api/echo/v1/echo -w 
"@curl-format.txt"

{

 "content": "hello world"

}

time_namelookup: 0.005

time_connect: 0.019

time_appconnect: 0.141

time_pretransfer: 0.141

time_redirect: 0.000

time_starttransfer: 0.903

--------

time_total: 0.903


MacBook-Pro$ curl -H "Content-Type: application/json" -X POST -d 
'{"content":"hello world"}' 
https://testtictactoe-164905.appspot.com/_ah/api/echo/v1/echo -w 
"@curl-format.txt"

{

 "content": "hello world"

}

time_namelookup: 0.005

time_connect: 0.018

time_appconnect: 0.151

time_pretransfer: 0.151

time_redirect: 0.000

time_starttransfer: 1.597

--------
time_total: 1.597 


    

On Friday, July 29, 2016 at 12:29:44 PM UTC-7, Christian Foster Howes wrote:
>
> looks like the pending MS logs mystery was solved: 
> https://groups.google.com/forum/#!topic/google-appengine/8mHxjsSCOYc  so 
> if you don't see that in your logs you can rule that out as a problem.
>
> On Friday, July 29, 2016 at 10:04:47 AM UTC-7, Christian F. Howes wrote:
>>
>> A helpful stat would be the "pending latency" (the amount of time that 
>> the request waited for an available instance to run on).  This was part 
>> of the logs in the old log viewer and is missing is the new log viewer. 
>> i believe someone has filed an issue requesting that it be re-added. 
>>
>> if any of your requests are cacheable, setting proper cache headers will 
>> trigger google's edge cache and dramatically reduce server side latency 
>> as well. 
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/59d53e09-4b2f-46a6-a990-f20afd3a3cea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to