什么将automatic_scaling max_idle_instances设置为零(0)呢? [英] What does setting the automatic_scaling max_idle_instances to zero (0) do?

查看:155
本文介绍了什么将automatic_scaling max_idle_instances设置为零(0)呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将automatic_scaling max_idle_instances设置为零(0)是做什么的?

  automatic_scaling:
max_idle_instances:0
min_idle_instances:0

是否会导致活动实例在完成处理后立即关闭当前请求?

解决方案

从技术上讲,您甚至不能设置 max_idle_instances 它至 0 ,您会在部署时发现此错误:

 错误400:---开始服务器输出--- 
automatic_scaling.max_idle_instances(0),必须在[1,1000]范围内。
---结束服务器输出---

部署版本号低于已经部署的可能不会(立即)关闭已经运行超过新配置数量的空闲实例 - 该限制不是硬限制,在某些情况下可以超过限制。例如,从 automatic_scaling 行rel =nofollow noreferrer>缩放元素表格:


注意:在加载峰值之后达到正常水平时,空闲实例的数量可能暂时超过您指定的
最大值。但是,您不会因为您指定的
最大数量而收取更多实例费用。


您还应该保留请记住,此配置适用于空闲实例,而不适用于动态/活动实例(这是处理大多数流量的实例)。降低 max_idle_instances 配置不会影响动态实例。



空闲实例仅用于瞬时溢出流量 - 请求目前正在运行的动态实例无法在传入流量突然上升的情况下处理可接受的延迟,而GAE则增加了额外的动态实例。

从上面引用的同一文档:
$ b


因为App Engine保留空闲实例,所以请求将不会进入等待队列,除非异常
高负载峰值。您将需要测试您的应用程序和期望的
流量,以确定保留
储备的理想实例数。



What does setting the automatic_scaling max_idle_instances to zero (0) do?

automatic_scaling:
  max_idle_instances: 0
  min_idle_instances: 0

Does it cause an active instance to shutdown immediately once it has finished processing it's current requests?

解决方案

Technically you can't even set max_idle_instances it to 0, you'll see this error at deployment time:

Error 400: --- begin server output ---
automatic_scaling.max_idle_instances (0), must be in the range [1,1000].
--- end server output ---

Deploying a version with a lower number than the one already deployed might not (immediately) shut down idle instances already running that exceed the newly configured number - the limit is not a "hard" one, in some cases it can be exceeded. For example, from the automatic_scaling row in the Scaling elements table:

Note: When settling back to normal levels after a load spike, the number of idle instances can temporarily exceed your specified maximum. However, you will not be charged for more instances than the maximum number you've specified.

You should also keep in mind that this config applies to the idle instances, not to the dynamic/active instances (which are the ones handling most of the traffic). Lowering the max_idle_instances config won't affect the dynamic instances.

The idle instances only serve transient overflowing traffic - requests that the currently running dynamic instances can't handle with acceptable latency during sudden rises of the incoming traffic, while GAE spins up additional dynamic instances.

From the same doc referenced above:

Because App Engine keeps idle instances in reserve, it is unlikely that requests will enter the pending queue except in exceptionally high load spikes. You will need to test your application and expected traffic volume to determine the ideal number of instances to keep in reserve.

这篇关于什么将automatic_scaling max_idle_instances设置为零(0)呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆