google 云函数价格计算问题

google cloud function price calculation issue

我想计算 google 云函数的价格,但我对定价指标网络有点困惑。正如他们在这里所说 https://cloud.google.com/functions/pricing#networking

The amount of data transferred out of your function each time it is invoked.

计算为联网。假设我在 google 云上部署了我的云功能,并且有人从托管在他们自己的服务器上的应用程序调用该云功能。我的云函数发送了 20kb 的结果。这也算联网吗。 google 我也会为此付出代价吗?

是的,您需要为移出 Google 网络的任何出站流量付费。

根据您的使用情况,您可能低于网络流量的免费套餐范围。引用自网络定价页面。

Cloud Functions provides a perpetual free tier for compute-time resources, which includes an allocation of both GB-seconds and GHz-seconds. In addition to the 2 million invocations, the free tier provides 400,000 GB-seconds, 200,000 GHz-seconds of compute time and 5GB of Internet egress traffic per month. Note that even for free tier usage, we require a valid billing account.

您可以将账单数据导出到 BigQuery[1],然后通过运行 此查询获取 Cloud Functions 的网络出口:

SELECT usage_amount, usage_unit

FROM billing_data_table

WHERE sku.id='B068-6B82-C017' OR sku.id=’4BAF-1AD8-483C’

Cloud Functions 网络出口“sku.id”是全球的 4BAF-1AD8-483C,us-central-1 的 B068-6B82-C017[2]