Ask
35
@quietmargin ·

Is there a hard spending cap on Firebase once you leave the free tier? Budget alerts do not stop anything Cap it

About to move off the no-cost plan because I keep hitting the daily Firestore quota. The thing that has stopped me for two months is the asymmetry: a bug on the free tier costs me an outage, and the same bug on a paid plan costs me money, and I do not know the upper bound on the second one.

What the billing docs say, as far as I can tell: budgets and budget alerts do not cap usage or charges, they notify. And there can be a delay between incurring the cost and the alert arriving, up to a few days depending on the service. The second half is the part that actually worries me, because a notification that arrives on Thursday about Monday is not a control.

So: is there a real hard cap anywhere, and if not, what do people actually run instead? Solo project, no team, and I need something that works while I am asleep rather than something I have to be watching.

7 answers Share
Report

Answering anonymously — a moderator will review it first.

  • @pgpolicy_nadia · 2h ago · 2 replies

    There is no hard cap, and it is deliberate rather than an oversight. The stated reasoning in the docs is that they cannot distinguish a runaway loop from unexpected growth, so they do not turn your services off on your behalf.

    The documented pattern is to wire the budget notification to Pub/Sub and run a function that disables billing on the project when a threshold is crossed. That is a real stop, not a notification.

    Understand the tradeoff before you build it. It takes the project down. For a side project that is exactly right, an outage is much better than an invoice you cannot pay. For anything with customers it is not, and you want throttling at the application layer instead. Also note it inherits the same reporting delay as the alert, so it is a backstop, not a tripwire.

    24
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @two_vcpu_club · 2h ago

      And fire it once on purpose, in a throwaway project, before you rely on it. A kill switch you have never tested is a hope with a deployment attached. Ours had a permissions problem that we would only ever have discovered on the worst possible day.

      9
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
  • @edge_runtime_bo · 2h ago

    The protections that have actually saved me are all at the application layer, because they stop the loop rather than the invoice:

    • App Check, so unknown clients cannot hammer your backend at all
    • limits in your security rules, so an unbounded query is not expressible
    • mandatory pagination, never an open ended collection fetch from a client
    • a guard on anything recursive or retrying, especially a function that writes to a collection it also triggers on

    That last one is the classic runaway bill: a trigger that fires itself. No budget setting will save you from it and it will do a month of usage in an hour.

    13
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @flat_rate_finn · 2h ago

    The thing that bites people is rarely the feature they just launched. It is the background stuff: retries with no backoff, a scheduled job that overlapped itself, a listener left attached, storage that only ever grows.

    Cheapest habit that has caught all of mine: a daily cost email, broken down by service, arriving in the morning. It does not prevent anything, but it means a bad night is a bad morning instead of a bad month, and after a fortnight you know your own normal well enough that anything odd is obvious at a glance.

    6
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @ramen_profit_ray · 2h ago

    Worth checking whether the specific services you use expose an editable quota in the Cloud console. Where a service does let you set a lower quota, that behaves like a ceiling in a way that a budget does not, because it is enforced at the API rather than reported after the fact.

    Coverage varies by service, so do not assume it exists for everything in your stack. Look up each one you actually depend on, and where it exists, set it slightly above your real peak. Where it does not, fall back to the application layer limits.

    10
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @costbasis_carl · 2h ago · 2 replies

    Just set the budget to $5 and it stops there. That is what a budget is for.

    8
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @oncall_omar · 10h ago

      It does not stop there. This is the single most expensive misunderstanding in this product and it is worth being blunt about.

      Budgets and budget alerts notify, they do not cap usage or charges. The docs say so directly. On top of that the cost data itself lags, by up to a few days for some services, so the moment your $5 alert arrives you may already be well past $5 with more still unreported.

      A budget is a smoke alarm. It is not a sprinkler. If you want something to actually stop, you have to build the stopping part, which is the Pub/Sub plus disable-billing pattern above, plus limits inside your own app.

      20
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report