简体   繁体   中英

How do you keep a running instance for Google App Engine

It seems the google app engine and developers console has changed again. I can not figure out how to keep a instance for google app engine running, even when the site is idol. There use to be a slider for this under the app engine settings, but this is no longer there. I think in Google Speak I have dynamic instances and I need one resident instance to start with. The first hit on the site is just taking way too long.

While the answer provided by Dan is correct - module type determines the scaling - you probably want to keep at least one instance of your default module with "automatic scaling" around on a low traffic site.

You can setup a cron job and ping your webapp every minute as a way to achieve this.

A more costly approach would be to set min-idle-instances to 1 for your default module. But you will have 2 instances (the idle instance becomes no longer idle, so GAE spins up a new idle one) as soon as there is traffic on your site.

For a low traffic site, I would also suggest setting min-pending-latency a bit higher (like 5 secs) and concurrent requests high enough to prevent spinning up new instances if multiple Ajax requests are fired on your homepage. This will ensure that the single instance will serve them all, and no extra instances start spinning up too soon.

The instance uptime depends on the type of scaling configured for the respective module. Only manual and basic scaling module instances can be resident. Selecting a module scaling type is done via the respective module's configuration file .

You may also want to take a look at warmup requests , which would help reduce the response times when additional instances are started besides the very first/resident instance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM