【发布时间】:2018-04-25 01:21:54
【问题描述】:
We 正在开发一个小型电子商务项目,我们使用GAE 作为我们的 Web 服务后端,但它正在耗尽我们的财务资源。我们研究了我们当前的基础设施以及它是如何计费的。这向我们表明,这是因为我们正在使用的实例。
我们正在运行 7 services,它使用 12 instances 作为一个整体。
想了解如何在不使用 Google App Engine 实例时停止它,因为它是我们计费的主要来源。
服务
UpdateFeed.yaml
application: ...
module: updatecategoryfeed
version: uno
runtime: python27
api_version: 1
instance_class: F1
threadsafe: true
automatic_scaling:
min_idle_instances: 6
max_idle_instances: automatic # default value
min_pending_latency: 30ms # default value
max_pending_latency: automatic
max_concurrent_requests: 50
handlers:
- url: /.*
script: FeedModule.FeedBuilder.update_category_feed
libraries:
- name: endpoints
version: 1.0
- name: webapp2
version: "latest"
- name: ssl
version: latest
所有其他服务都遵循相同的结构。我们共有 7 项有效服务。
更新 2
我们根据项目要求降低了自动缩放值,min idle instances 为 0,max idle instance 为 1。价格急剧下降。但是我们仍在寻找如何在不使用时停止实例的答案。例如。下图显示了一个在没有任何活动的情况下自行启动并正在计费的实例。
【问题讨论】:
-
你的服务配置是什么?
-
@DanCornilescu 请关注更新后的查询
-
旁注:您将
app.yaml放在Services之前的方式似乎表明您可能假设app.yaml具有更重要的作用。它没有,充其量只是默认服务的配置文件。除非您已经单独拥有它,否则它实际上可能未被使用。见stackoverflow.com/questions/34110178/…。如果我误解了,请忽略。
标签: google-app-engine google-cloud-platform