Google AppEngine: How Often "Run at Runtime" Occurs

I plan to host the JRuby on Rails application in Google AppEngine / Java. I found an excellent Ola Bini blog post on how to do this, but in a summary he says:

In general, JRuby on Rails works very well in the App Engine, with the exception of some smaller details. Key launch cost and testing. In the form of this happening, you cannot actually get GAE / J to anticipate things. Instead, you must allow the first release uninstall . Now GAE / J does the warning of bytecodes and so on, so the launch is a little harder than on other JDKs. One runtime takes about 20 seconds, the wall time to start, so the first hit takes some time.

I do not quite understand this. How often under what circumstances does run time start? A regular 20 second lag is likely to be a problem.

+6
java google-app-engine
source share
1 answer

App Engine will launch new time series for you when demand outstrips the currently running instances. He will then turn off the instances when demand is lower. Ultimately, this means that all of your instances can be closed if your application is not used for a certain time. Then, the next time the user tries to access your application, you will need to launch a new instance or β€œdeploy”, as some people call it.

As of March, the application development team did not give any official assessment of how long the instance will remain in place:

 7:40 pm] nwinter: Is it possible to get a rough estimate of how long an app
 instance will stick around once spawned?
 [7:40 pm] marzia_google: @nwinter, not really
 [7:40 pm] marzia_google: there are no garuntees
 [7:41 pm] nwinter: No average time or anything?
 [7:42 pm] marzia_google: @nwinter i'm not sure an average time would be
 meaningful, even if i knew off hand what it was (i don't)
 [7:42 pm] marzia_google: since it really can be quite variable
 [7:42 pm] Kardax: Re instance lifetime: So an app instance could last a few
 seconds or a few hours?  Just curious
 [7:43 pm] dan_google: nwinter: Apps are evicted by least-recently-used on an
 app server.  As someone noted recently (forums or chat I forget), low
 traffic could mean lots of "restarts", but so could spikes in traffic which
 may start new instances on multiple app servers.
 [7:43 pm] nwinter: @dan_google: good to know!
 [7:43 pm] dan_google: Kardax: Yes, depending on the weather.  By which I
 mean, request patterns, other apps on each app server, and so forth.  Not
 really predictable. 

This is a transcript of the chat with the application development team. I deleted the unnecessary lines in the decryption, for example, "so entered." Full transcript can be found here.

+7
source share

All Articles