dongqin5604 2013-07-23 13:05
浏览 55
已采纳

Google App Engine何时启动或停止实例?

We have an App Engine app that handles an average .5 requests per second, and seemingly all those requests can be handled by the same instance running a Go app as the main version.

However, sometimes App Engine kicks off a second instance (and sometimes even a third one), that doesn't seem to do anything past handling one or two requests. Here's an example.

enter image description here

Shutting down that instance manually doesn't seem to cause any harm, so my question is, why does App Engine not kill the instance after it did not get any requests for a while? (The above example had four requests in the past hour, often the requests/age ratio gets even lower).

Update:

A similar situation is when an instance is started on a different version. App Engine only seems to kill the instance after hours of not getting any requests.

Under Application Settings → Performance,

  • Idle Instances is set to Automatic – 20
  • Pending Latency is set to 150ms – 250ms
  • 写回答

2条回答 默认 最新

  • doulun1666 2014-04-21 04:10
    关注

    I wish I knew what controls if/when it kills idle instances, but I can't see any documentation of it.

    To avoid excess instances starting, I think the main thing you can do here is increase the pending latency:

    The Pending Latency slider controls how long requests spend in the pending queue before being served by an Instance of the default version of your application. If the minimum pending latency is high App Engine will allow requests to wait rather than start new Instances to process them. This can reduce the number of instance hours your application uses, but can result in more user-visible latency.

    Even if you only average 4 requests/hour, if you happen to get two closely spaced I suppose it's possible it would start a new instance.

    You can also see some small amount of information in the logs about why it started a new instance.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序