You are correct, executing a URL Fetch request during the initiation of 
your code will cause a large amount of latency as your instance must wait 
for the requesting server to respond. As previously mentioned you can use 
the Stackdriver Trace <https://cloud.google.com/trace/> tool on a specific 
'/_ah/warmup' request that is seeing high latency to investigate the exact 
parts of your code that are taking up the most time. 

Using this same tool I went ahead and took a look at your project. I saw 
that on 2016-10-22 a single '/urlfetch.Fetch' took 47.5 seconds to return 
in one of your '/_ah/warmup' instance startups. I also saw a single request 
to your endpoint '/api/admin/warmup' took 62 seconds, and 56 
'/datastore_v3.Put' calls took a combined 2 seconds, all during the same 
instance startup. These results were quickly pulled from the 'Summary' tab 
in the trace details <https://cloud.google.com/trace/docs/viewing-details> for 
one of your calls. 

Concerning the latency comparison of running your app in production vs 
locally in development. While running locally your application and all of 
its assets lives within a local web server on your computer. This web 
server is hosted on your same localhost IP, meaning any outgoing requests 
will be instantly served by your same computer. This differs from 
production in that any URL Fetch request or API call needs to be served 
from a different location by a different server, bringing network latency 
and the traffic congestion of each server into the mix.  

You can easily see from the above how removing URL Fetch requests and 
batching your requests to Google Services would drastically reduce the 
startup time for your instances. 


-- 
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 [email protected].
To post to this group, send email to [email protected].
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/f1a781ea-3664-41af-992c-6bcf6320f438%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine]... Shashikanth Reddy
    • [google-appen... 'Jordan (Cloud Platform Support)' via Google App Engine
      • [google-a... Vidya Narayanan
        • [goog... 'Jordan (Cloud Platform Support)' via Google App Engine
          • R... Vidya
            • ... Jeff Schnitzer
              • ... Nick
                • ... Vidya
                • ... 'Jordan (Cloud Platform Support)' via Google App Engine
            • ... 'Jordan (Cloud Platform Support)' via Google App Engine

Reply via email to