Why does Google Appengine Server take a long time for the first request after creating a new instance?

I am using GoogleAppengine Java. I would like to know why it takes a long time for the first request when a new instance is created ?. I would also like to know if there are better ways to analyze the performance of the Google Appenige application?

Any suggestions would be appreciated

+3


source to share


1 answer


High response time for new copies

When the first request forces the AppEngine to create a new instance, additional tasks arise, such as loading the required libraries, running static initializers, instantiating servlet classes, etc.

This can be done before the first requests are created and served by the new instance. This is why warm-up requests were invented . You can tell AppEngine to run some code before the instance is ready to serve requests, eliminating the higher response times for new instances. You can learn more about this here:

Warmup Requests (Java AppEngine web.xml)

Also read about Setting Idle Instances and Setting Pending Latency .



Statistics

There is a very detailed built-in statistical solution for developers. You have to manually enable it, but then it will appear in the admin console. It uses the Servlet Filter API to "intercept" all your calls and perform measurements and statistics.

More about this:

Appstats for Java

+2


source







All Articles