有没有办法限制Firebase的Blaze计划? [英] Is there a way to limit Firebase's Blaze plan?

查看:127
本文介绍了有没有办法限制Firebase的Blaze计划?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用社交网络应用程序,并且需要执行搜索功能。 Firestore不支持此类查询,因此我需要使用Algolia之类的外部服务。

I'm currently working in a social network app and I need to do a search feature. Firestore does not support these kind of queries, so I need to use an external service like Algolia.

问题是免费计划不支持连接到外部网站/除了Google自己的API之外,因此我无法连接到Algolia来使我的搜索系统正常工作。

The problem is that the free plan does not support connecting to external websites/APIs other than Google's own ones, so I can't connect to Algolia to get my search system working.

我读过多个有关由于循环而使开发人员支付高额费用的故事或代码中的错误,并且由于Blaze计划是现收现付计划,因此需要向他们收取所用的费用。如果循环产生了10TB的文件,他们将为此付费。

I have read multiple stories about devs paying high bills because of loops or errors in their code, and as the Blaze plan is a pay-to-go plan, they get charged what they used. If a loop generated 10TB of files they will get charged for that.

我还知道,只要每个(单独)保持低于Blaze计划的功能,它们都是免费的免费Spark计划的限制。

I also know that Blaze plan's features are free as long as each of them (individually) stay below the limits of the free Spark plan.

因此,正如我的问题所述,有没有办法设置限制?例如,我想告诉Firebase将我的云函数调用限制为每月100k。这样一来,它将是免费的,而且我将永远无法获得超过100k的赠金,这意味着我永远也不会为此付费。

So as my question says, is there a way to set limits? For example, I would like to tell Firebase to limit my cloud functions invocations to 100k per month. That way it would be free and I would never be able to get over 100k as it's limited, which means I'll never get billed for that.

请注意,我现在从付费计划中唯一需要的 就是与外部网络的连接。我不需要任何其他东西,因为我们才刚刚开始,而且该应用尚未投入生产,因此没有很大的限制。

Take into account that the only thing I need right now from a paid plan is the connection to external networks. I don't need anything else as we're just starting and the app is not in production, so there's no need for huge limits.

推荐答案

每个Firebase项目也是Google Cloud Platform项目。这意味着您的Firebase项目也可以使用Google Cloud Platform的许多高级功能。

Every Firebase project is also a Google Cloud Platform project. This means that many of the advanced features of Google Cloud Platform are also available for your Firebase project.

例如,您可以为Firebase项目设置计费警报,以便在使用量达到一定水平时向您发出警报。虽然您无法将其配置为在某个时候关闭项目,但是该警报通常可以很好地提醒您异常的使用模式。

For example, you can set up billing alert for your Firebase project, so that you are alerted when the usage reaches a certain level. While you can't configure it to switch off the project at some point, the alert should typically be quite good for alerting you to unusual usage patterns.

有关此内容的更多信息请参阅:

For more on this see:

  • Tracking your spending with budgets in a recent blog post.
  • The GCP documentation on how to set budget alerts, which is what Firebase uses under the hood.

由于您专门标记了 google-cloud-firestore ,因此我也建议您查看< a href = https://firebase.google.com/docs/firestore/quotas#manage_spending rel = noreferrer>有关支出管理的文档。它显示了如何通过GCP控制台设置Firestore的每日支出限额,而不仅仅是警报。

Since you specifically tagged with google-cloud-firestore, I also recommend you check out the documentation on managing spending. It shows how to set a daily spending limit for Firestore, instead of just an alert, through the GCP console.

这篇关于有没有办法限制Firebase的Blaze计划?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆