View all resources
Decision guide

When to migrate from Firebase

2026-04-06

Context

Firebase is a great choice for MVPs. Real-time sync, auth, and file storage in a single SDK. For solo founders and early-stage teams, it removes database setup entirely.

But Firebase is a product with real constraints. As your product grows, those constraints start costing you engineering time.

Signs you should migrate

1. Your queries are getting creative

Firestore's query model is collection-based. No joins. No aggregations. No GROUP BY. If you find yourself writing multiple queries and stitching results in memory, you've outgrown the data model.

2. Your costs are unpredictable

Firebase bills per read, write, and delete. A single dashboard page that shows 50 records costs 50 reads. Pagination helps, but complex dashboards accumulate cost fast. When your Firebase bill becomes hard to reason about, it's a signal.

3. You're doing reporting or analytics

Exporting Firebase data for analytics requires workarounds — Cloud Functions, BigQuery sync, or third-party ETL. A relational database connects directly to your BI tools.

4. You have multi-tenant requirements

Row-level security in Firebase requires careful denormalization and custom security rules. PostgreSQL RLS policies are explicit, testable, and auditable.

5. Migrations feel scary

Schema changes in Firestore are implicit — you just start writing different fields. At scale, mixed-schema documents become a support burden. When your team starts dreading data model changes, you've hit the ceiling.

Signs you should wait

  • Your team is smaller than 3 engineers
  • You're still iterating on product fundamentals
  • Your data model is genuinely document-oriented (no need for relations)
  • Firebase costs are under 200/month and predictable

Migration checklist

If you've decided to migrate, here's the sequence that minimizes risk:

  • Audit your Firestore collections and document structure
  • Map each collection to a relational schema (identify foreign keys, normalization opportunities)
  • Export current data to JSON via Firebase Admin SDK
  • Stand up a PostgreSQL instance (RDS, Cloud SQL, Supabase, or self-hosted)
  • Write migration scripts to transform and insert exported data
  • Run your application against the new database in a staging environment
  • Update application code to use the new database client (Drizzle, Prisma, or raw SQL)
  • Implement RLS policies for multi-tenancy if applicable
  • Set up connection pooling (PgBouncer or built-in pooler)
  • Validate data integrity with row counts and spot checks
  • Cut over production traffic with a maintenance window or dual-write period

Typical migration timeline

Team sizeMigration complexityEstimated time
1-2 engineersSmall schema, under 100K records1-2 weeks
3-5 engineersMedium schema, 100K-1M records2-4 weeks
5+ engineersLarge schema, multiple services4-8 weeks

The migration itself is rarely the bottleneck. Updating all application code that touches the database takes longer than moving the data.

Recommendation

Migrate when Firebase is actively slowing your team down — not proactively, and not reactively after a crisis. The migration window is usually after Series A when you have the engineering bandwidth to do it right.

If you're unsure, instrument your Firebase costs and query complexity for 30 days. The trend will tell you what to do.

Need help deciding?

Book a free 30-minute architecture review call. I'll help you cut through the noise and pick the right stack for your stage.

Nicolas Cava

Early-stage CTO helping founders build scalable software and teams from MVP to $5M+ ARR without burnout.

Stay in the loop

Weekly insights on engineering leadership, scaling teams, and building better software.

Support my work

Your support helps me keep my content free, independent, and consistently valuable.

Buy Me A Coffee

© 2026 Nicolas Cava. All rights reserved.