AppEngine实例小时数

时间:2019-02-08 21:15:38

标签: node.js google-app-engine app-engine-flexible

是否可以免费运行App Engine?无论我尝试了什么,似乎都是不可能的,我也很困惑他们如何计算CPU时间。

例如,我正在使用具有最多实例数的Flex环境; 1,CPU; 1。

我了解appengine flex每天提供28个小时的免费服务。我有一个非常简单的nodejs管理面板,一天使用几次,我为此花了30英镑,这是胡说八道。他们如何计算时间?无论如何,我一天要消耗超过24小时?通过使用多个vCPU?为什么没人使用我的代码时会使用多个vCPU。

我已经厌倦了各种不同配置的负载,但是却一无所获。我检查过每个实例都只有一个实例。可供参考的是我的应用程式Yaml:

# Used to configure Google App Engine
# See https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml
# .gitignore contains the entry server/app.yaml so when this file is copied it isn't comitted to source control
runtime: nodejs
env: flex

skip_files:
  - ^(.*/)?.*/node_modules/.*$

automatic_scaling:
  max_num_instances: 1

resources:
  cpu: 1

instance_class: F1
threadsafe: false

定价(8天8英镑左右)

enter image description here

2 个答案:

答案 0 :(得分:2)

App Engine flexible environment不提供免费套餐。 App Engine standard environment确实提供了免费套餐。查看Node.js standard environment是否适合您的应用程序。如果没有,请考虑切换到Compute Engine,其免费套餐中有f1-micro instance

答案 1 :(得分:0)

我设法将所有给定答案中的正确配置拼接在一起,以获得免费的appengine实例。

这里是:

# Copyright 2017, Google, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# [START gae_quickstart_yaml]
runtime: nodejs10
# [END gae_quickstart_yaml]

automatic_scaling:
  min_instances: 0
  max_instances: 1