在开发时,我想将成本保持在最低限度,结果 - 将App Engine实例的数量限制为1(当前在两个上运行(。
我跟随了几个答案,但没有结果。
我发现的唯一官方答案建议在app.yaml中设置 max_idle_instances
,但是这样做会导致部署期间以下错误:
ERROR: (gcloud.app.deploy) Error Response: [400] VM-based automatic scaling should NOT have the following parameter(s): [max_idle_instances]
还有其他方法吗?
谢谢
我假设您正在使用标准环境。
这是我使用后端实例定义服务的方法 -
runtime: python27
api_version: 1
threadsafe: true
service: worker
instance_class: B1
basic_scaling:
max_instances: 1
handlers:
- url: /worker/.*
script: worker.app
login: admin
作为参考,您可以在此处查看完整项目:https://github.com/alpeware/gcms
它很简单:
runtime: nodejs
env: flex
manual_scaling:
instances: 1