ToolScore
Data & Files 4 min read

The Firestore $30-to-$800 Month: How Per-Document Pricing Explodes

$30 → $800/month, one missing pagination call the number that matters here

By Stan K.

A 5,000-user app loading one unpaginated collection grew from $30 to $800/month. Security Rules reads, multi-region doubling, daily free-tier caps and no hard spend ceiling — the four mechanisms behind every Firestore bill shock, with the fixes.

Firestore’s pricing is simple: $0.03 per 100K document reads, $0.09 per 100K writes, $0.01 per 100K deletes (single region). Simple pricing plus per-operation billing plus a generous free tier equals a specific failure mode: bills that are invisible at test scale and exponential at production scale. The canonical documented case: an app with 5,000 daily users loaded its entire 500-document product catalog on every home-screen open. Three opens per user per day = 7.5 million document reads daily. The bill went from ~$30 to ~$800/month. One missing pagination call.

Here are the four mechanisms, so you can check your own app against each.

Mechanism 1: the read multiplier in your own code

Every document a query touches is billed, not every document you display. The recurring offenders:

  • Unpaginated collection reads — the catalog case above
  • get()/exists() inside Security Rules — every lookup in your rules is itself a billed document read; rules that check three documents per request triple-read
  • Client-side listeners that over-subscribe — onSnapshot on a collection re-reads on every change

The audit is one question per screen: how many documents does this screen read per visit, honestly? Multiply by visits. That’s the bill.

Mechanism 2: multi-region is a flat 2×

Firestore’s multi-region deployment (nam5) bills reads at $0.06 and writes at $0.18 per 100K — exactly double single-region. Multi-region is the right call for latency-critical, globally-read apps; it is a silent 2× on the same codebase for everyone else. It’s the only line item in this list that’s a deliberate choice rather than a bug — make it deliberately.

Mechanism 3: daily caps that punish spiky traffic

The free tier grants 50K reads and 20K writes per day. An app at 1M reads/month fits comfortably in free (≈33K/day) if traffic is even — and blows through the daily cap on every spike, paying full price exactly when traffic is highest. Free tiers shaped as daily quotas convert viral moments into invoices.

Mechanism 4: no hard ceiling

Firebase’s Blaze (pay-as-you-go) plan has no built-in hard spending cap — a budget alert notifies, but traffic keeps billing until you act. Exposed API keys and runaway Cloud Function loops are the documented disasters: hobby projects jumping from $10 to $4,976; a function whose trigger wrote back to the document it listened to, looping until the owner woke up.

The loop nobody watches for

An onUpdate trigger that writes to the same document it listens to is an infinite billing loop. Firebase’s official mitigation is a custom kill-switch (a Pub/Sub function that disables billing). Build the kill-switch before launch day, not after the incident.

The same trap, other vendors

Firestore is the famous case, not the only one:

  • Turso bills per row read — one unindexed SELECT scanning 100K rows to return one is a 100K-row read. The 500M free monthly reads survive exactly until the first analytical query.
  • MongoDB Atlas doesn’t bill per operation, but the M0 free cluster’s 100 ops/sec cap forces the Flex tier ($8–30/month, capped) and then the M10 cliff at $56.94/month the moment you exceed 5 GB or need VPC peering.
  • Supabase bills flat ($25/month Pro) but egress after 250 GB runs $0.09/GB — the bandwidth variant of the same surprise.

The full per-provider comparison at a fixed workload (1M reads + 100K writes) is in the Databases hub.

The fix list

  1. Paginate everything, server-side. Limit + cursor, no exceptions, including “small” collections.
  2. Count rule lookups. Move authorization data into custom claims where possible; every get() in rules is a billed read.
  3. Decide multi-region explicitly. 2× is fine if it’s a decision.
  4. Build the spend kill-switch — a scheduled function that checks spend and disables billing. Treat it as part of deployment, not a nice-to-have.
  5. Index before you analyze on row-billed providers; one missing index is a 100,000× multiplier.
  6. Load-test with billing open for one hour before launch. The $30→$800 curve is visible in the first ten minutes of realistic traffic.

And if you’re choosing a backend today: the exit costs differ enormously — the migration math shows Firestore-to-SQL at 2–6 weeks of rework versus Supabase-to-Postgres at a pg_dump. Bill shock is recoverable; lock-in compounds it.

Numbers change — the math doesn't
Token prices and plan limits shift monthly; the structural arguments in this guide age slowly. For current per-tool numbers see the live rankings.