Google App Engine manual scaling instance log littered with /_ah/start requests -


i serving static website google app engine module/service. in order improve latency, have configured manual scaling 2 b4 instances up. while works ok, logs of module/service virtually littered /_ah/start requests. understand, warmup request sent instance when launches. here app.yaml:

runtime: python27 api_version: 1 threadsafe: true module: site default_expiration: "2d" instance_class: b4 manual_scaling:     instances: 2  handlers:     -         url: /proxy/vimeo         script: site_main.app         secure:     -         url: /auth/vimeo\.html         static_files: static/vimeo.html         upload: static/vimeo.html         secure:     -         url: '/[^\.]*$'         static_files: static/index.html         upload: static/index.html         secure:     -         url: /assets/(.*)$         static_files: static/assets/\1         upload: static/.*         secure:         expiration: "31d"     -         url: '/*'         static_dir: static/         secure: skip_files:     - '^(.*/)?#.*#$'     - '^(.*/)?.*~$'     - '^(.*/)?.*\.py[co]$'     - '^(.*/)?\..*$'     - '^(.*/)?.*\.gz' 

with our setup of manually scaled, memory-resident instances though, not understand why request being made often. in fact, think there 1 /_ah/start request every web session being served, extremely odd. has made same experience?

from startup:

each module instance created in response start request, empty http request /_ah/start. app engine sends request bring instance existence; users cannot send request /_ah/start. manual , basic scaling instances must respond start request before can handle request. start request can used 2 purposes:

  • to start program runs indefinitely, without accepting further requests
  • to initialize instance before receives additional traffic

manual, basic, , automatically scaling instances startup differently. when start manual scaling instance, app engine sends /_ah/start request each instance. when start instance of basic scaling module, app engine allows accept traffic, /_ah/start request not sent instance until receives first user request. multiple basic scaling instances started necessary, in order handle increased traffic. automatically scaling instances not receive /_ah/start request.

when instance responds /_ah/start request http status code of 200–299 or 404, considered have started , can handle additional requests. otherwise, app engine terminates instance. manual scaling instances restarted immediately, while basic scaling instances restarted when needed serving traffic.

so it's normal such requests since chose manual scaling , app should reply in manner prevent gae repeating request (after restarting instance).

but since don't have active app code , serve static content can safely return default (automatic) scaling no /_ah/start requests made. change should have no impact whatsoever on response time - static content served gae infra directly, cdn, without touching running app (where instance configs matter). same reason can drop instance class cheapest one: b1.

update:

actually app.yaml content indicate active code in app:

    url: /proxy/vimeo     script: site_main.app 

for should have corresponding site_main.py file. if performance of code requires keep current scaling/instance configs add file handler /_ah/start requests, replying 1 of codes gae interprets success - should put end log littering.


Comments