Resident Instances turning into Dynamic Instances to handle requests does not effect the time required to start an instance (it is actually designed to help it). When a new Idle Resident Instance is required, an '/_ah/warmup' will be sent to your application. This will trigger the creation of a new instance, and your code will begin to run. Therefore if you are seeing high latency during instance startup, it is likely your code that is the cause.
You can use the Stackdriver Trace <https://cloud.google.com/trace/docs/viewing-details> tool to sort requests to your application over a period of time by highest latency. You can then select the requests with the highest latency which will show you the actual processes that ran during the request. If your code makes any URL Fetch requests to other applications or servers, this forces your app to wait for this external service to run, causing higher latency. Multiple individual calls to other Google services such as the Datastore may also cause latency. It is recommended to perform batch requests <https://cloud.google.com/datastore/docs/concepts/entities#batch_operations> to any Google service that supports it, in order to reduce the amount of calls your application makes. By optimizing the time needed to execute your code, the latency experienced by an incoming request will be reduced. -- 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/d4baf583-826f-45b3-b139-1f47e699697e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
