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 docker环境配置
  • ¥20 绿盟安全扫描--检测到目标站点存在javascript框架库漏洞
  • ¥30 Android STD快速启动
  • ¥15 如何使用simulink建立一个永磁同步直线电机模型?
  • ¥30 天体光谱图的的绘制并得到星表
  • ¥15 PointNet++的onnx模型只能使用一次
  • ¥20 西南科技大学数字信号处理
  • ¥15 有两个非常“自以为是”烦人的问题急期待大家解决!
  • ¥30 STM32 INMP441无法读取数据
  • ¥15 R语言绘制密度图,一个密度曲线内fill不同颜色如何实现