如何在不使用时停止Google AppEngine实例? [英] How to stop Google AppEngine instances when not being used?
问题描述
更新2
我们根据我们的项目需求减少了自动缩放值,其中 min空闲实例
为0并且 max idle instance
为1.价格急剧下降。但是我们仍然在寻找如何在不使用时停止实例的答案。例如。下图显示了一个没有任何活动并且正在收费的实例。
<在 automatic_scaling
部分中放置您的 min_idle_instances
配置 - 这些配置有效地表示始终运行的实例 - 由于这个原因也被称为驻留实例。
它们的作用不是定期处理流量。当流量超过正在运行的动态实例的容量以保持较低的延迟时,它们仅在短时间内处理溢出流量,而GAE则会增加额外的动态实例(这是实际处理大量实例的实例)。
为防万一不明确 - 常驻实例不会消失 - 即使没有任何活动,他们的工作仍然保持活跃状态现场。
We are developing a small e-commerce project for which we are using GAE
as our web service backend but it's draining our financial resources. We studied our current infrastructure and how it was billed. That shows us that it's because of the instances we are using.
We have 7 services
running which is using 12 instances
as a whole.
Want to understand how to stop Google App Engine
instances when not being used as it's the key contributor to our billing.
Services
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
All other services following the same structure. We have a total of 7 active services.
UPDATE 2
We decreased the auto scaling values as per our project requirements which min idle instances
to 0 and max idle instance
to be 1. The price dropped drastically. But we are still looking for the answer on how to stop an instance when not being used. For ex. the below graph shows an instance started on its own without any activity and is being billed.
Drop your min_idle_instances
configuration in the automatic_scaling
section - those configs effectively represent instances running at all times - also called resident instances for that reason.
Their role is not to handle traffic regularly. They only handle overflow traffic for short periods of time when the traffic exceeds the capacity of the running dynamic instances to keep the latencies low, while GAE spins up additional dynamic instances (which are the ones actually handling the bulk of the traffic).
Just in case it's not clear - resident instances aren't going away - it is their job to remain alive even if there is no activity on the site.
这篇关于如何在不使用时停止Google AppEngine实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!