gpt4 book ai didi

java - AppEngine 标准 — 无法在 appengine-web.xml 中将 设置为 0

转载 作者:行者123 更新时间:2023-12-02 11:12:31 27 4
gpt4 key购买 nike

有了新的rollout AppEngine 的自动缩放器,新的 configuration选项如 min-instancesmax-instances添加了自动缩放配置,表示可以,例如将最小实例数设置为 0 以降低成本:

<min-instances>

Optional. The minimum number of instances for App Engine to create for this module version. These instances serve traffic when requests arrive, and continue to serve traffic even when additional instances are started up as required to handle traffic.

Specify a value from 0 to 1000. You can set the parameter to the value 0 to allow scaling to 0 instances to lower costs when no requests are being served. Note that you are charged for the number of instances specified whether they are receiving traffic or not.

但是,关于 xsd仅随 AppEngine 云 SDK 提供的架构 positive-integer可以设置在 min-instances 范围内或max-instances标签:

<xs:complexType name="automatic-scaling-type">
<xs:all>
<xs:element type="xs:string" name="min-pending-latency" minOccurs="0"/>
<xs:element type="xs:string" name="max-pending-latency" minOccurs="0"/>
<xs:element type="xs:string" name="min-idle-instances" minOccurs="0"/>
<xs:element type="xs:string" name="max-idle-instances" minOccurs="0"/>
<xs:element type="xs:positiveInteger" name="min-instances" minOccurs="0"/>
<xs:element type="xs:positiveInteger" name="max-instances" minOccurs="0"/>
<xs:element type="xs:double" name="target-cpu-utilization" minOccurs="0"/>
<xs:element type="xs:double" name="target-throughput-utilization" minOccurs="0"/>
<xs:element type="xs:string" name="max-concurrent-requests" minOccurs="0"/>
<xs:element type="xs:positiveInteger" name="min-num-instances" minOccurs="0"/>
<xs:element type="xs:positiveInteger" name="max-num-instances" minOccurs="0"/>
<xs:element type="xs:positiveInteger" name="cool-down-period-sec" minOccurs="0"/>
<xs:element type="ns:cpu-utilization-type" name="cpu-utilization" minOccurs="0" xmlns:ns="http://appengine.google.com/ns/1.0"/>
<xs:element type="xs:positiveInteger" name="target-network-sent-bytes-per-sec" minOccurs="0"/>
<xs:element type="xs:positiveInteger" name="target-network-sent-packets-per-sec" minOccurs="0"/>
<xs:element type="xs:positiveInteger" name="target-network-received-bytes-per-sec" minOccurs="0"/>
<xs:element type="xs:positiveInteger" name="target-network-received-packets-per-sec" minOccurs="0"/>
<xs:element type="xs:positiveInteger" name="target-disk-write-bytes-per-sec" minOccurs="0"/>
<xs:element type="xs:positiveInteger" name="target-disk-write-ops-per-sec" minOccurs="0"/>
<xs:element type="xs:positiveInteger" name="target-disk-read-bytes-per-sec" minOccurs="0"/>
<xs:element type="xs:positiveInteger" name="target-disk-read-ops-per-sec" minOccurs="0"/>
<xs:element type="xs:positiveInteger" name="target-request-count-per-sec" minOccurs="0"/>
<xs:element type="xs:positiveInteger" name="target-concurrent-requests" minOccurs="0"/>
<xs:element type="ns:flex-custom-metrics-array" name="custom-metrics" minOccurs="0"/>
</xs:all>
</xs:complexType>

我确实同意将其设置为正整数对于 max-instances 是有意义的但是min-instances呢? ?这是文档中的错误或打印错误吗?

最佳答案

这是一个 bug在 Java AppEngine SDK 中,现已使用新的 SDK 版本解决:1.9.64 .

关于java - AppEngine 标准 — 无法在 appengine-web.xml 中将 <min-instances> 设置为 0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50524655/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com