一些 Google App Engine 实例的负载在其他实例中非常小。为什么?

The load in some Google App Engine instances and very small in others. Why?

正如您在下面的快照中看到的,一些动态实例中的负载很大(超过 20k 个请求),而其他实例中的负载很小。

为什么会这样? GAE不应该统一分配负载吗??

如果负载在活动的动态实例之间保持平衡,那么它们很少会空闲(仅当 整个 应用程序的流量几乎降为零时),因此它会很难动态关闭它们。

更多信息在这里:

这是我从 Google App Engine 专家那里得到的:

App Engine request scheduling uses several heuristics for routing requests to application instances. At low QPS it stays in affinity scheduling mode and routes majority of requests to instances that have most recently responded to the health check and handled requests successfully. That would explain why you see this variation in number of requests for each instance. As you ramp up the application traffic, load should even out across all instances.

我还询问了 GAE 关闭实例所遵循的政策是什么。我看到他们中的许多人即使没有收到任何请求也已启动

Dynamic instances that are not serving requests get garbage collected eventually. However, you only get billed for 15 additional minutes after they serve the last request. Please refer to this doc for additional information on instance billing.

https://cloud.google.com/appengine/kb/billing#different_on_demand_instance_resident