Is there a way to limit Firebase's Blaze plan?

前端 未结 3 2036
生来不讨喜
生来不讨喜 2020-12-01 15:54

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

相关标签:
3条回答
  • 2020-12-01 16:11

    You cannot set spending limits to your app now.

    As of December 12, 2019, you can no longer create spending limits, but you can change or remove existing spending limits.

    https://cloud.google.com/appengine/pricing#spending_limit

    You can create budgets, which will alert you when reaching the budget. But it won't stop the usage when hitting the budget.

    https://cloud.google.com/billing/docs/how-to/budgets#add-new-budget

    0 讨论(0)
  • 2020-12-01 16:26

    The screenshot here seems to show a Spending Limit setting for Firebase projects: Firebase: Budget and Daily Spending Limit

    That settings page is located here (the Spending Limit setting apparently only shows up once you set up billing for the project): https://console.cloud.google.com/appengine/settings

    It's disabled in the poster's case, but I think that's only because he connected it up to a "NodeJS App Engine app", which isn't the case for many Firebase developers.

    I haven't tried it yet myself, but will do so once I start a paid plan.

    EDIT: Yep, the setting shows up once you switch to a paid plan. (in my case, Blaze) I don't have enough traffic yet to confirm that it works as expected, but if I find later that it doesn't, I'll give an update here.

    0 讨论(0)
  • 2020-12-01 16:27

    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.

    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.

    The GCP documentation now also has a section on capping (disabling) billing to stop usage. This is a brute force approach though and may lead to data being lost, so I'd recommend investigating all other options first

    0 讨论(0)
提交回复
热议问题